Magda Linette put Poland ahead in the tie with a hard-fought 7-6 (8/6), 2-6, 6-4 marathon victory in three hours 51 minutes against Sara Sorribes Tormo.
Emma Raducanu and Katie Boulter also sent Great Britain into the last eight with a 2-0 win over Germany after they both won their singles rubbers.
Poland matched their best ever BJK Cup result by reaching the last eight for the first time since 2015, where they will face 11-time champions Czech Republic.
Friday's tie had been postponed on Wednesday after a severe weather alert in the region, following devastating floods in the east of Spain.
Five-time Grand Slam champion Swiatek, appearing in the BJK Cup finals for the first time, was given a stern test by world number 12 Badosa, but eventually triumphed by converting her fourth match point.
"Magda played an amazing match in the morning, we both did it... I'm happy we finally won a match in the Billie Jean King Cup finals, it's a huge step for sure," said Swiatek.
"For sure (Badosa) pushed me and there was a lot of pressure."
The first match was even closer with Linette emerging triumphant after a gruelling scrap against world number 106 Sorribes Tormo at the Martin Carpena arena.
The Pole defeated her opponent for the first time in five meetings with their tussle finishing nine minutes short of the longest ever BJK Cup match.
"I hate playing Sara... I knew it was going to take me four hours and it did," said Linette, ranked 38th.
"I'm so happy, I've never beaten her before and it took everything that I had today."
Britain ease through
Germany, who were hoping for their 100th BJK Cup victory, last faced Britain in 1985 and came into the tie as underdogs.
Raducanu, playing for the first time since suffering a foot injury in September, largely impressed but needed six match points to seal a 6-4, 6-4 victory over Jule Niemeier.
"I think I played some really good tennis today, playing Jule on an indoor hard-court isn't easy," said 2021 US Open winner Raducanu, currently ranked 58th.
"It's a game of holding serve and trying to get a break where you can, I obviously haven't played a match in a long time so I think these are small sharpness things that come the more matches I play, I'm very proud of how I regrouped and managed to close out in that final game."
British number one Boulter made light work of Laura Siegemund in the second singles match to wrap up the tie with a 6-1, 6-2 triumph.
After the German broke in the first game Boulter won the next six to claim the first set in commanding fashion.
Boulter sealed her win with a forehand down the line to convert her second match point and set up a last eight clash with Canada.
"I'm thrilled with getting a rubber for GB today, matches like these mean more than all the other ones because you're playing with a flag on your chest," said Boulter, who was backed by strong British support.
On Thursday Slovakia upset the United States and finals debutants Japan squeezed past Romania to reach the quarter-finals.