Murray added the Rio title to his 2012 triumph and to his Grand Slam collection of the 2012 US Open and 2013 and 2016 Wimbledon crowns.
It also stretched the 29-year-old's current winning streak to 18.
The final will go down as one of the best in the Olympics, lasting over four hours and ending with both men embracing at the net.
"Today was a very up and down match, very stressful. Both of us had a lot of chances and, it was a long and tiring match. I'm just glad I managed to get through it," said Murray.
He ended with 10 aces and 46 crunching winners while del Potro smashed 39 winners but was undone by 57 unforced errors.
Del Potro, a bronze medallist in London four years ago, was inconsolable at the end, weeping as he sat courtside.
The Argentine has fought his way back to the top after undergoing three surgeries.
"What he's had to go through over the last three years or so with his wrists -- I can't imagine how mentally difficult that would have been, how frustrating that would have been for him," added Murray.
"To get himself back to playing at this level, fighting for the biggest events and competing against the greatest players in the world is an amazing credit to him. He should be very proud of his efforts."
Murray took a 5-2 career advantage over 2012 bronze medallist del Potro into the final and he was quickly in the ascendancy, breaking for a 2-0 lead.
Del Potro, who was pushed to the brink of retirement last year after undergoing the wrist surgeries, was slow out of the blocks.
That was hardly a surprise for a player who had defeated two of the top three seeds to make the final -- Novak Djokovic in the first round and then winning a three hour epic to beat Rafael Nadal in Saturday's semi-finals.
But he soon found his range, breaking in the third game before handing the advantage straight back, allowing Murray to stretch out to a 4-1 lead.