Alphonso Davies smashed the visiting German giants ahead in the second half but record 14-time winners Madrid produced a sensational comeback with Joselu netting in the 88th and 91st minutes.
Spanish champions Real Madrid face another German side, Borussia Dortmund, in the Wembley final on June 1, after they stunned the team they call their “black beast”.
Journeyman striker and back-up option Joselu, on as a late substitute, wrote his name in Madrid’s history books with his last-gasp brace, giving Europe’s comeback kings another night to remember.
“There have been a lot of times we have looked dead and buried, but we have that mentality of never say die,” said Real midfielder Jude Bellingham.
“Joselu deserves it all, he has been an amazing squad member this season.”
Madrid had enjoyed the better of the match but it seemed Davies’ superb strike had set up a repeat of the 2013 all-German Champions League final in London.
Instead, Joselu consigned Bayern Munich to a first trophyless season since 2012, his first goal coming after a handling error from Bayern goalkeeper Manuel Neuer, who had superbly kept Madrid at bay until that point.
“(Before that) there were world-class saves after world-class saves, but that can happen, it’s football,” said Bayern defender Matthijs de Ligt.
Bayern coach Thomas Tuchel made three changes from the first leg, benching veteran Thomas Mueller and Leon Goretzka.
Dani Carvajal started for Madrid after missing the first leg suspended and was heavily involved as the hosts dominated the opening stages.
Rodrygo Goes was inches away from converting Carvajal’s low cross and the Spain defender then cleverly set up Vinicius Junior with a pass nutmegging a defender, and Manuel Neuer tipped the Brazilian’s shot against the post.
The rebound fell to Rodrygo but his effort was weak and with a desperate arm Neuer was able to claw it out to complete a fine double save.
Gnabry limped off injured
Bayern’s Serge Gnabry limped off injured with Davies replacing him before England captain Harry Kane’s first flash of danger.
Madrid goalkeeper Andriy Lunin was alert to push Kane’s vicious long-range volley around the post.
Neuer palmed away a Vinicius free-kick as the teams ended a high-intensity, relentlessly frantic first-half level.
The second period was just as fraught, with Davies’ cross deflecting onto the roof of Lunin’s goal.
Vinicius was unplayable down Madrid’s left and Rodrygo prodded his low cross agonizingly wide of the far post.
The 38-year-old Neuer made superb saves to deny both Brazilian forwards again before the hour mark as Madrid controlled the game and ratcheted up the pressure.
However, just as in Munich, when Los Blancos were at their strongest, Bayern pounced.
Kane fed Davies and the Canada international cut inside from the left and smashed a shot beyond Lunin into the far top corner after 68 minutes.
Madrid thought they had levelled moments later through Nacho but after a VAR review, the strike was ruled out as the defender had grabbed Joshua Kimmich’s face before shooting.
Tuchel took off Kane in the final stages to try and hold on to victory but it slipped through his fingers as Madrid produced more indelible European memories.
Neuer, who had been sublime to this point, fumbled what appeared a simple Vinicius strike and Joselu gratefully bundled home from close range.
With Bayern reeling Madrid struck again, decisively. It was Joselu once more, the striker on loan from second-division side Espanyol, turning home after Antonio Rudiger cut the ball back to him.
The goal was ruled offside but officials overturned the decision after review, and after nearly 15 minutes of stoppage time, Madrid earned the chance to go for their 15th Champions League trophy.
Bayern were left raging at full-time after De Ligt netted but play had been stopped beforehand for an offside flag against Noussair Mazraoui.
“I don’t want to say that it’s always the referee’s mistake with Real Madrid, but that made the difference today,” grumbled De Ligt, saying play should have been allowed to continue.