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. (Agencies)
Jo Wilfried-Tsonga earned France a 3-2 victory in Nancy, winning the decisive singles rubber against Tobias Kamke to set up a semi-final against holders Czech Republic who breezed past Japan in Tokyo.
Federer, winner of a record 17 grand slam singles crowns, has never won the Davis Cup but has targeted it this year alongside team mate Stanislas Wawrinka.
Australian Open winner Wawrinka, who struggled badly for most of the tie, finally found some form to beat Mikhail Kukushkin 6-7(4) 6-4 6-4 6-4 to level the tie at 2-2 on Sunday before Federer swept past Andrey Golubev 7-6(0) 6-2 6-3 in front of a partisan crowd in Geneva.
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 a fired-up 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," he said.
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.