France are also in the last four despite looking dead and buried on Friday when they lost the opening two singles matches against a weakened Germany line-up.
Wins for Jo Wilfried-Tsonga and Gael Monfils earned France a 3-2 victory in Nancy to set up a semi-final against holders Czech Republic who breezed past Japan in Tokyo 5-0.
When you need a player to win a decisive fifth rubber in a gripping Davis Cup tie, having one with 17 grand slam titles to his name would be a dream scenario for any team captain.
So it proved for Switzerland's Severin Luthi in Geneva's Palexpo on Sunday as Federer strolled out to face world No.64 Andrey Golubev after Australian Open champion Stanislas Wawrinka had hauled the Swiss level at 2-2 with a 6-7(4) 6-4 6-4 6-4 win over Mikhail Kukushkin.
Not that world No.4 Federer had it all his own way initially against Golubev who hit back from a break down to take the opening set to a tiebreak.
Federer then showed his class, winning the breaker 7-0 before taking the next two sets 6-2 6-3 and keep Switzerland on course for a first-ever Davis Cup title having fallen in the final to the United States in 1992.
"It's great. I was hoping so much I was going to get a chance to play and not just watch Stan play," said Federer.
"I got the opportunity and I'm happy I lived up to the hype and the expectations, and I was able to get the boys through so very happy for them.
"I was confident but not silly confident but respectful confident towards the opponent (we could do it)."
Britain began on Sunday with a 2-1 lead against Italy, needing just one of Sunday's two singles to reach the last four for the first time since 1981.
However, Wimbledon champion Andy Murray proved no match for an inspired Fabio Fognini who won 6-3 6-3 6-4 before Andreas Seppi overcame some early nerves to outclass James Ward 6-4 6-3 6-4 and put Italy in the semis for the first time since 1998.
"We have waited for a long time to go into the semi-finals," Italy captain Corrado Barazzutti said.
"We are very satisfied for that. This is really a great victory. We started the day with two difficult matches. My players played two great matches.
"It's difficult to believe that we won six sets."
France captain Arnaud Clement was also a happy man after his team emulated the 1996 side who also battled back from a 0-2 deficit to beat Italy.
Tsonga and Monfils were untroubled on Sunday as they completed the recovery job to keep France on course for a first Davis Cup title for 13 years.
"I'm just so proud of my players," he said, "because coming from 2-0 down on the first day was not easy.
"There was a fantastic reaction from them, starting with the doubles. Germany showed a lot of spirit and energy - it's a real team - but I just knew that my players would give more than 100 percent for the rest of the tie."
The semi-finals take place in France and Switzerland on Sept 12-14.