Alexander Peya and Oliver Marach overcame a shaky start following a rain delay to beat Marcel Granollers and Marc Lopez 3-6, 6-4, 6-4, 7-6 (12) on the Marina d'Or clay court.
After squandering four match points, Peya hit a winner at the net to end the match at just over three and a half hours.
The decisive reverse singles will be on Sunday.
Five-time champions Spain, playing without Rafael Nadal, will again look to David Ferrer and Nicolas Almagro, who brushed aside Jurgen Melzer and Andreas Haider-Maurer in Friday's opening singles.
The winner will face the United States or France in the semifinals in September.
"It was very important for us to win today as after being down 2-0 we didn't want to lose the tie and go home already after the second day," Marach said. "After the rain break we decided to play different tactics which was good for us. We played more aggressively and it worked."
The hosts looked to be the more comfortable pair early on. Austria scrambled to save five break points before Spain finally broke Peya's serve to go ahead 4-3 after he returned Lopez's volley wide.
Lopez, who had been doubtful before the game with back pains, held serve and Spain had little trouble closing out the first set.
But just when it appeared that Spain was on course to ease into the semifinals, a rain delay changed the course of the match.
Austria improved after the short stoppage and broke for the first time to go ahead 3-2 in the second set. They evened the score at a set apiece after Marach hit his team's second ace and Lopez sent his lob long. It was Austria's first set of the tie.
"The rain delay favored them but that is just the weather and you have to deal with it," Spain captain Alex Corretja said. "It is a shame because until that moment we were playing better. On returning to the court they put the pressure on us."
The third set was even until Granollers slipped with his serve and Peya blasted a winner past Lopez at the net to break Spain and go in front 4-3.
A storm shower again sent the players and fans scurrying for cover with the fourth set level at three games each.
The match saw its longest exchanges and best play after the second break as the score swayed back and forth in the tiebreaker until Austria finally finished Spain off.
"If we had been able to win the tiebreaker in the fourth set we would have emerged a little stronger," Corretja said. "Now I am concerned about recovering for tomorrow. The most positive thing is that our singles players have rested today."
Spain hasn't lost at home since 1999 and is seeking its 23rd straight home win.
Austria, in the quarterfinals for the first time in 17 years, is trying to make just its second semifinal.