Holders Czech Republic will face France in the Fed Cup final after both nations won final-rubber doubles matches to set up a showdown in November.
The champions and Switzerland were level at 1-1 heading into the decisive second day of action in Lucerne and edged in front when Karolina Pliskova beat Timea Bacsinszky 6-4 6-2 in the opening singles match.
Viktorija Golubic produced heroics by coming from a set down to beat Pliskova on Saturday and the world number 129 kept the hosts alive by conjuring up another fightback to get the better of Barbora Strycova to level the tie at 2-2.
Golubic, only in the Swiss team due to Belinda Bencic's injury-enforced withdrawal, dug deep to claim a 3-6 7-6 (8-6) 6-1 triumph that threatened to end the Czechs' reign as champions.
Lucie Hradecka and Pliskova got the job done for the Czech Republic, though, winning 6-2 6-2 against Golubic and Martina Hingis in just an hour.
The Czechs will be competing in yet another final in France later this year as they eye a fifth triumph in six years.
France also had to seal victory the hard way, edging out the Netherlands 3-2 to reach their first final in 11 years.
Caroline Garcia and Kristina Mladenovic were France's heroes, battling back from a set down to beat Kiki Bertens and Richel Hogenkamp 4-6 6-3 6-3.
Bertens' straight-sets win over Mladenovic had put the Netherlands 2-1 up, but Garcia saw off Arantxa Rus 6-3 6-4 before going on to play her part in seeing France through in Trelaze.
Belarus beat Russia to seal their place in the World Group for the first time, while the United States, Spain and Germany secured their places in the top tier.