The re-run of last year’s title match, which ended with a similar result, took two hours, 20 minutes with Federer sealing his fate at the start of the third set, dropping serve as he delivered two double faults in the opening game.
The Swiss third seed had the chance to clinch his spot in the World Tour Finals starting in eight days’ time in London but will now have to wait until next week as the ATP regular season closes at the Paris Masters.
Del Potro now owns four titles this season and has defeated Federer in their last three matches.
The modest Argentine was apologetic in victory after beating the 17-time Grand Slam champion.
“I’m sorry again to beat you here,” he said only half-joking at the trophy presentation.
“It’s always a pleasure to play Roger. He’s the hero here and for me my biggest inspiration.
“You make history at every tournament you play. I’m proud to be playing at the same time as you.”
Federer fired 14 aces to no avail in the final as he failed to win what would have been just a second title in a disappointing season.
The 32-year-old was playing his eighth consecutive Basel final at the stadium where he got his start in the game as a ballboy nearly two decades ago.
He has played an overall 10 finals in Basel, winning five titles while he was bidding for his 78th career trophy from 113 finals.
Federer found himself on the back foot as Del Potro came up the early leader in the 54-minute opening set after breaking the Swiss but then losing his own serve a game later for a 5-4 lead.
As the opener went into a tiebreaker, Del Potro claimed a 4-1 lead before Federer got back into the chase, pulling to 3-5 but netting a forehand for three Del Potro set points. Only one was required.
Federer, loudly supported by an entire stadium of 9,200 fans, rallied in the second set to level with two breaks of the Argentine top seed.
But the Swiss star’s misfire in the opening game of the final set proved to be too much of a gap to overcome as Federer went down to defeat after a Del Potro 216kph ace set up match points.
The Argentine completed his afternoon after Federer saved the first.
“Congratulations to Juan, who has been having a great few years,” Federer said. “I had to fight hard all the way through.
“I feel I was lifting my level but so was he. At the end I felt I was playing not badly at all.”
Del Potro, already qualified for London, added Basel to his trophies this season in Rotterdam, Washington and earlier this month in Tokyo.
He now stands 48-13 on the season.