Seventh seed Tsonga unleashed a barrage of brilliant shot-making to level the match at two sets apiece but the Swiss maestro was composure personified as he captured the decisive break at 2-1 in the fifth.
Battling for survival, Tsonga saved four match points when serving to stay in the match, but Federer closed out victory on the fifth with an overhead smash to reach his 10th straight semifinal at Melbourne Park.
"It was a tough close for sure, but the whole match was tough. Any set could have gone any way," the 31-year-old said in a courtside interview.
"I feel a bit lucky obviously to come through ... but it was great pleasure to play Jo because he played great too.
"We haven't played for a year ... but I thought he played extremely aggressive."
Federer, seeded second, will play third seed Andy Murray for a place in the final as he continues his bid for a fifth title at Melbourne Park.
"I'm young, you know, I'll recover quick - compared to the seniors, of course," Federer joked. "I'm looking forward to it. He's a great guy, a great player."
Federer signalled his intent immediately, creating two break-points and he took the first with a blazing crosscourt return to break Tsonga in his opening service game.
Tsonga, a 2008 finalist, was unbowed, however, and unleashed a searing cross-court return before out-rallying Federer to break back and take the set into a tiebreak.
The Frenchman dropped his guard, allowing Federer a 3-0 head-start and yelped in dismay after slamming a backhand into the net to concede the first set.
Tsonga hit back, breaking Federer in the seventh game of the second and allowing the Swiss only two points on his serve before sealing it with a huge serve that grazed the T-line.
The momentum swung again in the third as Federer lifted the pressure with stunning retrievals and roared as he landed a searing backhand down the line to bring up two set points.
Federer closed it out in spectacular fashion, charging to his left to retrieve a stinging cross-court backhand, then angling an improbable return at Tsonga's shoelaces that the Frenchmen could only poke wide.
That was the prelude for a stunning fourth set as both players struggling to hold serve in the face of sumptuous shot-making.
With adrenalin still pumping, Tsonga landed a telling blow, firing a scorching passing shot to bring up break point in the eighth game, then finessing a backhand volley into the corner to serve for the match.
Federer blasted a backhand wide to allow the pumped-up Frenchman set point, and Tsonga, tension etched on his brow, sealed it with an ace.
Federer went for the jugular in the third game of the fifth set, breaking the Frenchman and calmly marching on to keep his campaign alive for an 18th grand slam title.