Bastian Schweinsteiger scored the decisive spot-kick after Manuel Neuer had made two stunning saves to deny Cristiano Ronaldo and Kaka.
David Alaba and Mario Gomez had sent Iker Casillas the wrong way to put Bayern in control of the shootout, but Real were handed a lifeline as the Spanish captain saved from Toni Kroos and Philipp Lahm.
However, after Sergio Ramos had blasted his attempt over the bar, Schweinsteiger was calmness personified as he slammed the ball home to send Bayern into their second final in three years.
Real had erased their 2-1 deficit from the first leg within five minutes as Alaba was somewhat harshly punished for handling Angel Di Maria’s shot and Ronaldo slotted home the resulting penalty.
The visitors responded positively though and should have been level within minutes as Alaba nearly made amends for conceding the penalty with a brilliant run and cross but somehow Arjen Robben scuffed the ball over the bar from only yards out.
Franck Ribery was then denied by a brilliant saving challenge from Sami Khedira after Casillas had spilled a Gomez shot from 20 yards, but only 15 minutes had passed when Ronaldo doubled his tally and Madrid’s advantage on the evening as he raced on to a brilliant through-ball from Mesut Ozil and stroked the ball past Neuer from the edge of the area.
The tie was back on a knife-edge 12 minutes later though as Pepe was penalised for a push on Gomez as he tried to get on the end of Kroos’ cross into the box.
Robben had missed a significant penalty in the Bundesliga title decider against Borussia Dortmund a fortnight ago, but the former Real player stepped up again and his spot-kick just sneaked past Casillas who got a hand to the ball.
The chances continued to flow at both ends towards the end of an engrossing 45 minutes as firstly Karim Benzema’s curling effort floated just over the bar before Gomez was again found by Kroos but the man who had scored 12 goals in his previous 10 European appearances could not find a way past Casillas.
The Real captain was called into action again in the final action of the first-half as he palmed away Robben’s free-kick and the visitors came close again right at the start of the second period as Gomez’s header from Philipp Lahm’s cross crept inches wide.
Generally though both sides tightened up significantly in the second half and opportunities were far harder to come by at either end.
Benzema brought a smart save from Neuer before the Frenchman wasted Real’s clearest opening after the break as he fired over from the edge of the area after being fed by Ronaldo.
Gomez then had the chance to send Bayern into the final with five minutes remaining of normal time as Robben found him free inside the area but he took too many touches and allowed the Real defence to recover and block his effort.
The home side regained the initiative at the start of extra time but tiredness seemed to affect their decision making in the final third as Ronaldo dallied to allow Lahm to make a crucial last-ditch challenge before the break and Kaka did likewise when presented with the ball in the area with just eight minutes remaining.
Real had claims for a third penalty of the evening turned down moments later as instead Esteban Granero was booked for going down under pressure from Neuer.
And that decision was to prove vital as Ronaldo, Kaka and Ramos all failed from the spot to hand the Germans a place in the final on May 19.