Federer only once failed to reach the last four in 11 previous appearances at the season-ending event and he recovered from a set and a break down, and then 3-0 down in the final set, to subdue the Argentine fourth seed and maintain his impressive record.
The six-time Tour Finals champion qualified in second place in Group B behind defending champion Novak Djokovic and will face world number one Rafael Nadal in Sunday's semifinals at London's O2 Arena.
"A lot of coming from behind, trying to get back into the match, and it was amazing that I was able to pull it off," Federer said.
"I could never play free flowing tennis," he admitted.
"I fought hard, maybe got a bit lucky at times."
After a disappointing year saw his ranking tumble to seventh in the world, Federer remains in with a chance of finishing the season on a high with a fourth successive appearance in the final of the Tour Finals.
"I don't get a day off, I've got to back it up and be ready to go again tomorrow," Federer added ahead of the 32nd instalment of his epic rivalry with Nadal.
"I'll try to make his life a bit difficult."
Federer, a 17-time Grand Slam winner, had beaten del Potro in the quarterfinals of the Paris Masters last week, one of 14 victories in 19 previous meetings with the Argentine.
But del Potro got the better of the Swiss great in the Basel final last month and famously beat him in the 2009 US Open final.
Del Potro earned three break points in Federer's opening service game and converted the third when the 32-year-old drove a forehand wide.
Del Potro broke again for a 4-1 lead when Federer blew a 40-0 advantage before tamely netting with a forehand from the baseline on break point.
Federer managed to get one of the breaks back and reduced the gap to 4-5, but it wasn't enough as del Potro held his nerve, staving off two more break points before to closing out the set.
It was Del Potro who remained on top at the start of the second set and he broke for a 3-1 lead after Federer drove a lacklustre backhand into the net.
But Federer then sprang to life, earning three break points in the sixth game and taking the first of them thanks to a del Potro double-fault.
That came in the midst of run of 12 successive points for Federer as the momentum swung toward the Swiss, who levelled the match with a dominant display in the tie-break.
Federer made a sluggish start to the decider and once more del Potro capitalized, breaking en route to a 3-0 lead.
But remarkably, Del Potro again couldn't hold on as Federer roared back with a break in the fifth game and then landed another to move 6-5 ahead.
With the crowd shouting their support for Federer, the Swiss gave his fans another moment to treasure as he completed his comeback and sealed the win after two hours and 26 minutes with a thunderous ace.