Champions League: Real Madrid 2 Bayern 1 (Agg 3-3, 1-3 pens)
Real came into the match trailing 2-1 on aggregate from the first leg in Munich last week.
An early Cristiano Ronaldo brace put the hosts in charge at Estadio Santiago Bernabeu.
But Arjen Robben pulled a goal back with a spot-kick of his own just before the half-hour mark, levelling the tie 3-3 on aggregate.
Following a frantic, entertaining first 45 minutes, the match became cagey in the second half, as neither side proved willing to over commit.
And with extra-time unable to separate the teams, the semi-final was settled by the lottery of a penalty shootout.
Ironically, it was Bayern goalkeeper Manuel Neuer, booed by the club's fans for his Schalke allegiances upon signing in June, who proved the hero.
The Germany international saved from both Ronaldo and Kaka, before Sergio Ramos blasted his attempt sky high, allowing Bastian Schweinsteiger to net the winning penalty.
Earlier, it looked like Real Madrid would cruise through to the decider after they created several opportunities, scoring two of them.
Sami Khedira failed to beat Neuer from Angel Di Maria's cutback in the third minute, but the La Liga leaders were awarded a penalty when Di Maria's shot hit the arm of David Alaba inside the area three minutes later.
Ronaldo stepped up to take the spot kick and coolly slotted it into the bottom-right corner, sending Neuer the wrong way.
In reply, Bayern had two great opportunities to restore parity on the night.
First, Robben failed to tuck away Alaba's cross from inside the six-yard box, and then Khedira's block prevented Franck Ribery from tapping in a rebound off Mario Gomez's 20-yard strike.
Bayern had sent a strong message of intent to Jose Mourinho's Real, who responded in emphatic fashion.
In the 14th minute a deflected pass fell to Mesut Oezil, and he had enough time to pick out an unmarked Ronaldo on the edge of the box.
The Portugal forward was clinical, sliding the ball past Neuer at the near post to make it 2-0.
Despite falling behind on aggregate, Bayern continued to look dangerous and they were offered a chance to level the tie in the 27th minute.
Pepe dragged Mario Gomez to the ground inside the area and the referee duly pointed to the spot.
Former Real man Robben took on the responsibility and exorcised his Bernabeu demons by converting, despite Iker Casillas' best efforts to keep the penalty out.
The action continued at each end of the pitch - Karim Benzema almost curled an outrageous effort past Neuer, while Casillas was forced into saves from both Gomez and Robben before the break.
Initially, the second half began at a similar breathless tempo.
Gomez nodded just wide in the 48th minute, and Benzema forced a sprawling save from Neuer eight minutes later.
The action eventually fizzled out, as neither side dared commit too many men forward.
Chances were at a premium, and the only clear-cut opportunity came in the 86th minute.
Robben's pass found Gomez in space inside the area, but rather than shoot first time, he opted to control the ball and the chance went begging.
Ronaldo had a sight of goal snuffed out nine minutes into extra-time, while Real substitute Esteban Granero was booked for diving as he tried to win his side a penalty.
First up in the shootout was Austrian defender Alaba, who calmly netted the opening penalty.
Ronaldo failed to match him, with Neuer getting a strong hand to the ball.
Gomez then converted Bayern's second, before Neuer kept out a weak effort from Brazilian Kaka.
Real finally converted through former Liverpool midfielder Xabi Alonso, and they took heart when both Toni Kroos and Bayern captain Phillip Lahm missed.
But Spain defender Ramos was found wanting at the crucial moment, blasting wildly over and into the stands when Real had a chance to draw level in the shootout.
That offered Bayern stalwart Schweinsteiger the honour of putting his side into the final and he did so in emphatic fashion.
Victory for the Bundesliga side denies Jose Mourinho the chance to face former club Chelsea, while the hotly-tipped all-Spanish final also failed to materialise.
Bayern now have the opportunity to become the first club to win the Champions League at their own stadium when they tackle Chelsea at the Allianz Arena on May 19.