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 semi-final at Melbourne Park.
VIDEO HIGHLIGHTS: Federer v Tsonga
"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 tie-break.
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 set.
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 for an 18th Grand Slam title alive.
Results from day 10 of the Australian Open on Wednesday:Women's singles
Quarter-finals
Victoria Azarenka (BLR x1) bt Svetlana Kuznetsova (RUS) 7-5, 6-1
Sloane Stephens (USA x29) bt Serena Williams (USA x3) 3-6, 7-5, 6-4
Men's singles
Quarter-finals
Andy Murray (GBR x3) bt Jeremy Chardy (FRA) 6-4, 6-1, 6-2
Roger Federer (SUI x2) bt Jo Wilfried-Tsonga (FRA x7) 7-6 (7/4), 4-6, 7-6 (7/4), 3-6, 6-3
Men's doubles
Quarter-finals
Bob Bryan (USA)/Mike Bryan (USA x1) bt Daniele Bracciali (ITA)/Lukas Dlouhy (CZE) 6-3, 7-5
Simone Bolelli (ITA)/Fabio Fognini (ITA) bt Juan Sebastian Cabal (COL)/Robert Farah (COL) 1-6, 6-4, 6-3
Women's doubles
Semi-finals
Sara Errani (ITA)/Roberta Vinci (ITA x1) bt Ekaterina Makarova (RUS)/Elena Vesnina (RUS x4) 6-2, 6-4
Ashleigh Barty (AUS)/Casey Dellacqua (AUS) bt Varvara Lepchenko (USA)/Zheng Saisai (CHN) 6-2, 6-4
Mixed doubles
Quarter-finals
Kveta Peschke (CZE)/Marcin Matkowski (POL) bt Hsieh Su-wei (TPE)/Rohan Bopanna (IND) 6-2, 6-3
Yaroslava Shvedova (KAZ)/Denis Istomin (UZB) bt Nuria Llagostera Vives (ESP)/David Marrero (ESP) 6-4, 7-5