Federer is a five-time champion at Basel and seeks to reclaim the title taken by the fifth-ranked Argentine last year.
"It's always a pleasure for me," the top-seeded del Potro said of playing Federer. "I know all the people are waiting for that final and it would be like a rematch for him."
With victory on Sunday, the sixth-ranked Federer will also secure his place at the ATP Finals in London in just over a week, closing his most difficult season beset by back injuries and shocking defeats to lower-ranked opponents.
Federer improved his season record to 40-13, his fewest wins since he posted a 49-21 mark in 2001, the year he turned 20.
In a dramatic third set, wayward groundstrokes from Federer allowed Pospisil to break for a 3-1 lead.
"I was maybe a bit down, a bit tough with myself at the beginning of the third," Federer said. "I think that is also why I got broken. It had nothing to do with actual playing."
Federer reclaimed the break immediately, but had to fend off another break chance for Pospisil before holding at 4-4.
At 5-5, Federer wasted three break chances before finally leading in the set when Pospisil fired a forehand long.
Federer clinched victory with a powerful service winner and raised both arms in triumph after the two hour, 40-minute effort.
"Any winning match is a good thing right now. It's not like I have overplayed this year," he said.
Del Potro has a 4-13 career record against Federer, though he has won their past two meetings, both on indoor hard courts at Basel and London a year ago. He also clinched his only Grand Slam title, the 2009 U.S. Open, against the Swiss star.
Asked about Federer's comments this week that he needed to improve, del Potro suggested: "It doesn't matter what he says it's Roger Federer and he is playing in his hometown."
Del Potro also spent more than two hours on court and acknowledged some lapses with his play.
"I was frustrated because of missing my forehands and making a lot of double faults," he said.
Still, del Potro refocused quickly after giving up a 4-3 lead with a service break in the second set, as 65th-ranked Roger-Vasselin won three quick games to level the match.
Del Potro, who had three straight-sets victories to reach the semifinals, raced to a 4-0 lead in the third and converted his first match point when Roger-Vasselin returned a powerful serve long.