In Half-Blood Prince, we find out that Voldemort's family ring was a Horcrux, and in Deathly Hallows we find out that it actually contained the Resurrection Stone. How did the Gaunt family end up with the stone? Are they direct descendants of the original Peverell brothers?
It's not clear how the Gaunts are direct descendants of the Peverells -- specifically, the Gaunts are purported to be descended from Cadmus Peverell, owner of the Resurrection Stone. Although, how a direct blood relation to Cadmus can be proven is tricky because, as The Tale of the Three Brothers in Tales of Beedle the Bard tells us, Cadmus used the stone to bring back from the dead the woman he was going to marry, but never did; he committed suicide almost immediately after bringing her back from the dead. The assumption would be that they did not have children -- so, who then did the ring/stone pass on to? We know Antioch Peverell was almost immediately killed by a rival seeking the Elder Wand. So that leaves Ignotus Peverell, owner of the Invisibility Cloak, as rightful heir to the stone. But Beedle the Bard never says that Ignotus claimed the stone or kept it to pass down to his own son.
It's possible that Ignotus claimed the stone after Cadmus's death and that he did indeed pass it down to his son. According to J.K. Rowling, Harry is a descendant of Ignotus Peverell (so is rightful heir to the Invisibility Cloak) and is distantly related to Voldemort through the Peverell line. I haven't read anything more specific than that, though. So will we know how the Gaunt family came into possession of the stone/ring? No. At least not until J.K. Rowling tells us (Anyone, please correct me if I'm wrong and she's said something about it.). If there is a distant relationship between Harry and Voldemort's families, the possibility exists that at some point centuries ago, Gaunt's side of the family somehow got the stone from the Potters' side of the family, but to say how would be pure conjecture.
Also, if you read the text carefully, it has Morphin Gaunt claiming to be the last remaining descendant of Salazar Slytherin; he never claims to be related to the Peverells, only that he is in possession of the stone/ring with the Peverell coat of arms engraved on it (aka the sign of the Deathly Hallows) and that it has been in his family for centuries.
‘That’s right!’ roared Gaunt. For a moment, Harry thought Gaunt was making an obscene hand gesture, but then realised that he was showing Ogden the ugly, black-stoned ring he was wearing on his middle finger, waving it before Ogden’s eyes. ‘See this? See this? Know what it is? Know where it came from? Centuries it’s been in our family, that’s how far back we go, and pure-blood all the way! Know how much I’ve been offered for this, with the Peverell coat of arms on the stone?’
‘I’ve really no idea,’ said Ogden, blinking as the ring sailed within an inch of his nose, ‘and it’s quite beside the point, Mr Gaunt. Your son has committed –’
Deathly Hallows - page 196 - Bloomsbury - chapter 10, The House of Gaunt
For all we know, at some point a Gaunt stole the stone and began passing it off as a family heirloom to bolster their pure-blood pride. But, again, this is pure conjecture and there's no canon veracity to this idea. It's just not clear, unfortunately.
They got it by being of Peverell lineage.
The reason that the Gaunts have the Resurrection Stone is because they are of the Peverell bloodline. In an interview, JKR confirmed that the Gaunts were indeed of the Peverell bloodline, making Harry and Voldemort distantly related.
Renee: From reading about the original owners of the Deathly Hallows, the Peverell brothers, I'm wondering if Harry and Voldermort are distantly related [...] Voldermort's grandfather ended up with the resurrection stone ring?
J.K. Rowling: Yes, Harry and Voldemort are distantly related through the Peverells.
J.K. Rowling: Of course, nearly all wizarding families are related if you trace them back through the centuries. As was made clear in 'Deathly Hallows', Peverell blood would run through many wizarding families.
- J.K. Rowling and the Live Chat, Bloomsbury.com (July 30, 2007)
Therefore, the Gaunts most likely got the Resurrection Stone by inheriting it from their relations.
The True Quest for the Deathly Hallows
The true quest is not to re-unite the Hallows, but to get them out of the hands of dangerous wizards. We’ll work from the assumption that they were created by the brothers, and not death, as Dumbledore suggests. Let us look at the description of the three brothers, and why they chose the Hallows they did. Antioch was a combative man, so a powerful wand would of course be a logical choice for him. He creates the wand not for knowledge, but for power and revenge. He wishes to be feared and given respect.
Cadmus was an arrogant man, so humiliating others would be in his character. Telling others that today and tomorrow are easy, but brining back yesterday is his power. Someone dies, they are gone, but he can have anyone from yesterday, because of his powerful stone.
Ignotus was wise and humble. He knew it was always best to avoid bad situations when you can. He also did not want to be a part of the creation of these items. Remember death “reluctantly” gave him the cloak. What this really means is, Ignotus was reluctant to participate in the construction of these items, but his brothers kind of make him do it. He created the cloak, not for power, but for protection, for safety.
When Ignotus heard of the death of his brother, Antioch, he hurried to the brother to retrieve the wand. Hoping to ensure no one else would be tempted by the power of the wand to do great evil. He arrived far too late, and was unsuccessful in finding the killer of his brother, and the new master of the wand. He kept his ear out for any sign of it re-appearing, so he could retrieve it and keep it safe.
Ignotus could not help but notice that Cadmus was absent from the funeral of their brother. So he traveled to his home to see why he had not attended. When he reached his brothers home, he discovered him dead. Ignotus found a note from his brother, explaining what he was doing and why. He had taken his own life, to be with the one he loved. Ignotus found the stone his brother had created, and took it from his home. He did not want this to end up in the hands of someone who would abuse its power. He created a ring from the stone, to make it easier to carry. At some point soon after, he scratched what would become the sign of the Deathly Hallows on the stone.
Before his death, he gave the cloak to his eldest son that was to be passed down through the family until the Hallows could be re-united. The ring was given to his next oldest child so that it too could pass down until they could all be together again. The job of finding the wand was given to his children, who passed the quest down to their children. In time, the truth behind the quest was lost, as friends were brought in to help and the quest expanded into normal wizarding life. The Hallows were passed through the ages until Marvolo Gaunt was given the ring, and Harry Potter the cloak.
As only Cadmus was alive to know about all three Hallows, and would not have told anyone else about the dangerous objects, how else could anyone else have found out? The wand was a powerful wand no doubt and sought after, but the cloak and stone would have been unknown by anyone outside the family.
This explains how the ring was passed down in the family, by a man who killed himself before having children, how anyone outside the family learned of the cloak, how Marvolo could still say he was descended from the Peverells and how the quest became something of a legend.