Riqui Puig scored the winning penalty to set up a meeting with Real Madrid or Athletic Bilbao on Sunday but only after a sensational performance from Ter Stegen. Frenkie de Jong had given Barca the lead in the first half but Mikel Oyarzabal's second-half penalty, awarded for a handball by De Jong, took the game into extra-time.
La Real were the better side in the additional 30 minutes, but Ter Stegen made three stunning saves to take the game to penalties, where he kept out spot-kicks from Oyarzabal and Jon Bautista.
Ronald Koeman won't take pleasure in seeing his side having to defend so much but he will have been pleased by the performance delivered by Ronald Araujo. The Uruguayan was brilliant, second only to Ter Stegen, as Barca kept La Real at bay in an open game. Puig, whose minutes have been limited this season, will take confidence from stroking home the winning spot-kick, too.
The win means Barca will be able to win their first piece of silverware on Sunday, which could prove a springboard for their stuttering season.
The bad news arrived before kick-off with Lionel Messi not deemed fit enough to even make the bench and Sergino Dest unable to start because he was carrying a slight knock.
As for the game, Barca struggled to control the match like they have done in recent weeks and tired as the minutes passed. There is still plenty of room for improvement. The fact they had to play 120 minutes, too, in an already packed season wasn't ideal.
Manager rating out of 10
6 -- Koeman was missing five players through injury so his hands were tied to a certain degree but he could have made changes earlier to try and avoid extra-time.
Player ratings (1-10; 10 = best. Players introduced after 70 minutes get no rating)
GK Marc-Andre ter Stegen, 10 -- Wasn't overworked in normal time but produced three stunning saves in extra-time, the first from Joseba Zaldua and then two from Adnan Januzaj, the second of which was exceptional. Then came the penalty heroics.
DF Oscar Mingueza, 7 -- Showed his versatility by replacing Dest at right-back. Proving a really good defender to have in the squad.
DF Ronald Araujo, 9 -- Perhaps his best performance in a Barca shirt yet. Strong and quick across the ground and dominant in the air against a La Real side who posed plenty of problems.
DF Clement Lenglet, 7 -- Has benefitted from Araujo's form and improved in recent games following a tough spell earlier this season when he made a lot of mistakes.
DF Jordi Alba, 6 -- Did OK defensively but didn't contribute as he usually does in attack.
MF Sergio Busquets, 8 -- What he lacked in his legs he made up for positionally, reading the game splendidly to snuff out several Sociedad attacks.
MF Frenkie de Jong, 8 -- Continued his fine recent form with another non-stop display in midfield. Got into a ridiculous position to connect with Griezmann's cross to open the scoring and was unlucky to give away the penalty for handball.
MF Pedri, 7 -- Has already made himself undroppable. So sleek on the ball once again, he was just missing Messi's presence, who he's linked so well with in recent weeks.
FW Ousmane Dembele, 7 -- Hard to recall a game when he saw so much of the ball. Was reckless with it at times but kept asking for it and always looked a threat when running at the opposition. Wasted a couple of good attacks in extra-time.
FW Antoine Griezmann, 6 -- Worked hard and set up De Jong's header but Koeman will have wanted him to be more effective in the final third. The less said about his penalty the better.
FW Martin Braithwaite, 6 -- Did well in the build-up to De Jong's goal and worked the line tirelessly before coming off with 15 minutes to go in normal time.
FW Francisco Trincao, 6 -- Looked to open the game up by taking on players but often lacked support.
MF Riqui Puig, 6 -- Confidently scored the winning penalty after being brought on for extra-time.
MF Miralem Pjanic, 6 -- Like Puig, netted from the spot after coming on for extra-time.
DF Junior Firpo, N/R -- Handed a few minutes late on in place of Mingueza.