Maarten van der Weijden, who was given only a slim chance of survival after being diagnosed
with leukaemia,won the gold in the men's 10km open water marathon.
The Dutch swimmer discovered he had leukaemia in 2001 but pulled through after a stem cell transplant and chemotherapy and returned to the water two years later.
He added the Olympic title to his 25km world crown when he won a thrilling sprint finish in the inaugural 10km men's race after a stroke-for-stroke tussle which lasted nearly two hours.
"That makes it extra special," Van der Weijden said when asked about his recovery from cancer which he said had helped prepare him for Thursday's surge for victory.
"It proves that even after such an illness you can win gold."
With the end in sight, Van der Weijden pulled out from the three-way dogfight and charged past Briton David Davies to win in one hour 51 minutes 51 seconds.
Davies, who led for most of the race, had streaked two body lengths clear in the last 400 metres and looked certain to win but he had no answer to the 27-year-old Dutchman's stunning sprint finish.
Competing in only his third open water race, Davies was two seconds behind the winner, with German Thomas Lurz taking bronze.
Swimming in light wind and rain, Van der Weijden sat comfortably behind the leaders for almost the entire race, taking advantage of their slipsteam before kicking his legs and making a powerful charge for the finish.
He was thrilled by the victory and said he had tackled the race in the same way he had fought his illness.
"Leukaemia has taught me to think step by step ... just be patient, lay in your bed and wait," he said.
"That's almost the same strategy I chose here, to stay in the pack, stay easy, stay patient and wait for my chance."
Davies (left), a 1,500 metres freestyle bronze medallist at the last Olympics, said he was "delirious" after having the lead snatched from him with the gold medal within reach.
"It was the hardest thing I've ever done in my life," Davies told Reuters. "I made a lot of errors but I have to swim it that way, I have to do it from the front.
"I was swimming in zig zags, I was all over the place but I'm very proud of what I achieved."
He added: "Maarten is a worthy champion, a tough competitor, his story can inspire others. What he's achieved is fantastic, phenomenal."