The pair went stroke for stroke over the last 500 metres of the gruelling 10 kilometre event before Risztov got her hands on the finishing pads first at the Serpentine.
Risztov pipped Anderson to win the gold by just four tenths of a second, almost the same margin Dutch sprinter Ranomi Kromowidjojo won the 100 freestyle final by last week.
“It was a really tough race but I was prepared,” said Risztov. “In a few hours I will be much more happy because I’m really, really, really tired now.”
The battle for the bronze medal was also decided by the exact same tiny margin with Italy’s Martina Grimaldi getting there ahead of Britain’s two-time world champion Keri-Anne Payne.
The longest and most exhausting swimming race at the Olympics was contested at a recreational lake in Hyde Park that was constructed in 1730 and remains one of London’s most iconic tourist destinations.
It turned out to be as much a battle of survival as a test of the fittest with two swimmers failing to complete the event and others complaining about getting kicked and punched in the face.
South Africa’s Jessica Roux was pulled from the water halfway through the two-hour race while Brazilian Poliana Okimoto fainted from dehydration after she was hauled into one of the safety boats.
“It was a pretty violent race,” said Payne, who lost touch with the leaders when she paused to get an energy drink after the third of the six loops.
“I had to work pretty hard to get back to the position I like. I’m not really a fighter, I’m more of a lover, I guess.”
A former Olympic pool swimmer, who quit the sport in 2005 then made a comeback in open water in 2009, Risztov led for all but one of the six loops the competitors were required to swim.
She opened up a gap on the leading pack at the start of the final lap and was three body lengths clear approaching the finish when Anderson started to reel her in.
Anderson, whose older sister Alyssa won a gold medal at London as part of the American 4×200 metres freestyle relay team, drew level with Risztov as they approached the finish but the Hungarian kicked again to win in a time one hour 57 minutes and 38.2 seconds.
“I tried to catch up and I’m just happy with winning a medal,” said Anderson. “It takes a lot of mental confidence. It’s really hard but really rewarding.”
Tens of thousands of people lined the banks of the lake on a glorious summer’s day for one of the few events at the Games that were free for the public to watch.
They let out a mighty roar when the starter’s gun was fired and the 24 swimmers plunged from the pontoon into the murky water they had to share with geese, ducks and swans, thrashing through thick weeds and poisonous algae that can cause severe skin rashes, eye irritation, vomiting and diarrhoea.
Roux struggled from the outset and was in last place after each of the first three laps before quitting. Okimoto had been 14th after the opening but steadily fell back to 20th place with two loops left when she was forced to get help.
“She has had previous bouts of hypothermia but never one as serious as this,” said the Brazilian team press attache Eliana Alves.