How did Dumbledore figure the way to destroy Marvolo Gaunt's Ring was the sword of Gryffindor?
It's not really that hard to figure out. You only need to know two things:
- Basilisk venom is capable of destroying Horcruxes
- Goblin forged weapons, such as the Sword of Gryffindor, take on the properties of things which strengthen them
Dumbledore had already seen several years before that Basilisk venom was capable of destroying a Horcrux, since Harry used a broken off basilisk fang to destroy the diary.
Regardless of what you think about Dumbledore, I hope we can at least all agree that he wasn't an idiot. It doesn't seem like a stretch to assume that he'd know about the unique properties of the sword, and therefore that it would have (or at least might have) assumed the power of Basilisk venom and therefore had the power to destroy a Horcrux.
He is knowledgeable about magic
The sword could destroy the Horcrux, since, being goblin-made, it could absorb useful substances, such as basilisk venom. Basilisk venom, of course, is one of the few things that can destroy Horcruxes, as seen with Riddle's diary.
Phineas Nigellus seemed to think the properties of goblin silver were obvious.
Phineas Nigellus paused again in his struggles to free his eyes and sniggered.
“Muggle-borns,” he said. “Goblin-made armor does not require cleaning, simple girl. Goblins’ silver repels mundane dirt, imbibing only that which strengthens it.”
—Harry Potter and the Deathly Hallows
Of course, that may not have been the case, if Hermione did not know, but it certainly suggests that the propensity of goblin-made silver to absorb useful properties is well-known.
As an exceedingly intelligent and knowledgeable wizard, Albus Dumbledore presumably is aware of this, and would have guessed that the sword had absorbed basilisk venom. Even assuming he had not, he could probably have tested it to see if his hypothesis was correct.