All three goals came in the first half hour, Ronaldo on target twice to fire the hosts into an early 2-0 lead before Real and Chelsea old boy Arjen Robben pulled one back from the spot.
Mario Gomez missed some gilt-edged chances but the match drifted into a dirge, with Real tiring after their Clasico exertions at the weekend and Bayern's legs eventually fading.
The shoot-out was just as fraught with Bastian Schweinsteiger scoring the decisive spot-kick after Ronaldo, Kaka and Sergio Ramos missed for Real.
Toni Kroos and Philipp Lahm had seen efforts saved by Iker Casillas, with Bayern counterpart Manuel Neuer pulling off two superb stops before Ramos blasted over, sparking delirious scenes on the Bayern bench and another bout of Spanish soul-searching.
The first leg in Germany had also finished 2-1 in favour of the home team. The result means Bayern, who like final opponents Chelsea have disappointed domestically this season, will host Chelsea at their Allianz Arena stadium on May 19.
Bayern will have to do without Luis Gustavo, David Alaba and Holger Badstuber as all three picked up suspensions, joining Chelsea quartet John Terry, Branislav Ivanovic, Raul Meireles and Ramires on the sidelines.
Everyone expected a Clasico final when the semi-final draw was made, but neither of Spain's big guns made it through: Barcelona's exit was perhaps the more surprising result as Bayern more than matched Jose Mourinho's Madrid side in the capital.
Ronaldo’s first goal came early on, and it was controversial as youngster Alaba was harshly adjudged to have deliberately handled Angel Di Maria’s fifth-minute cross: the Austrian teenager was shown the card that rules him out of the final, while the Portuguese forward converted the penalty with the kind of aplomb that would be sorely lacking when it mattered most later on.
The former World Player of the Year and potential winner of next year’s edition soon added a second, sliding a cool low finish past a shell-shocked Neuer after Mesut Ozil split the Bayern defence with a through-ball.
Bayern were stunned but rallied impressively: they had missed two chances between the goals, Robben somehow blasting over from close range and Franck Ribery denied by a superb Sami Khedira challenge.
And they continued to create after falling two behind, although the decision to penalise Pepe for a push on Gomez was just as soft as Real’s spot-kick: Robben made no mistake from the spot.
Even on aggregate, Bayern sniffed a killer second and they went close as Gomez fired straight at Casillas after being sent clean through, while Ribery was again the victim of a perfect tackle just as he prepared to finish, this time from Xabi Alonso.
Real, for their part, were content to hit the Germans on the break, Karim Benzema’s inventive effort curling inches wide the best of a selection of efforts from range.
There was a shade of controversy on the stroke of half-time as a Robben free-kick – which he appeared to win through gamesmanship – was handled by Pepe in the wall. The offence was missed by the officials and Bayern.
The second half started well as Gomez sent a towering header just wide but, as is often the way when a vital second leg is evenly poised on away goals, the early belligerence soon drifted into a game of cat and mouse.
Only a few chances materialised, Benzema again firing one in from range with Neuer equal to it, before Gomez’s late howler.
In scintillating form this season, the German could not add to his 40-goal tally after dithering from eight yards when Robben had put him clean through: his decision to take a second touch when he was opened up for a simple side-foot finish allowed Ramos to block and extra-time to beckon.
That additional half-hour was a forgettable affair as players from both sides pulled up with cramp and, having looked the likelier in normal time on account of resting players at the weekend, Bayern started to toil.
Both sides were almost willing the shoot-out, which was surprisingly low on quality given the technical ability of Real, and the historic penalty supremacy of the Germans.
The goalkeeper is usually the star in such situations and, on this occasion, both were, Neuer’s marvellous stops from Ronaldo and Kaka shading Casillas’s saves from poor efforts by Lahm and Kroos. The sight of weak penalties from Germany internationals seemed bizarre to the neutral.
With Alaba and Gomez atoning for their faux-pas from open play, Alonso managed to convert his spot-kick to force Bayern true-blood Schweinsteiger to convert the final kick: he did so with ease, thus ending Mourinho’s hopes of a double this season.