Real, who have become specialists at progressing through the European knockout rounds in recent seasons, showed a perfect example of their ability to grind out results with this win against Bayern.
The defensive issues which led to a 3-1 defeat in their dramatic quarter-final second leg against Juventus resurfaced in the first half here, and they could have been further behind before Marcelo scored against the run of play.
The holders who are attempting to win the competition for the third successive season, struggled defensively but were clinical in attack – and Marcelo and Marco Asensio scored either side of half-time.
Marcelo smashed home a half-volley from the edge of the penalty area to level matters before Asensio capitalised on an error by Rafinha to score a breakaway goal.
Joshua Kimmich had put Bayern in front when he slotted past Keylor Navas at the near post.
The German champions missed a host of chances in an error-strewn encounter, while Real forward Cristiano Ronaldo had a goal ruled out for handball as his run of scoring in every game of this year’s competition ended.
Bayern must now score at least twice at the Bernabeu next Tuesday to prevent Real reaching a fourth final in five years.