Barcelona needed penalties to beat Brazilian side Internacional at the Audi Cup in Munich and will meet Bayen in the final.
An 86th-minute goal from Leandro Damiao denied Barca victory in normal time as the match was levelled at 2-2.
Barca had twice led in the game, having gone ahead through Thiago's strike in the 14th minute, moments before Ibrahim Afellay struck a post.
Right-back Nei levelled for Internacional in the 55th minute but they were level for only seven minutes before Jonathan Dos Santos put Barca back in front after being picked out by Carlos Carmona.
With time ticking down, Damiao turned the ball in from a corner to force penalty kicks.
Misses from Damiao and Ze Mario proved costly for the Brazilians as Armando got the winner.
The second game of the day also went to penalties, with hosts Bayern Munich eventually topping AC Milan 5-3 after a 1-1 draw in normal time.
Zlatan Ibrahimovic had put Milan in front just four minutes in after breaking through the Bayern defence, but the tournaments hosts levelled 10 minutes before the break as Toni Kroos fired home from Rafinha's cross.
The first seven penalties of the shoot-out were converted but after Alberto Paloschi missed for Milan, Bastian Schweinsteiger scored to settle it.
Barcelona will play Bayern on Wednesday evening with their vanquished opponents meeting each other earlier.