Bayern took the lead through Joshua Kimmich shortly before the half-hour mark, but the hosts were ultimately made to rue missed chances on their way to a damaging defeat.
Marcelo levelled things up against the run of play right on the stroke of the interval, before half-time sub Marco Asensio scored what proved to be the winning goal shortly before the hour mark to send Madrid into next week's second leg with a significant advantage.
Find out how all of the action unfolded courtesy of Sports Mole's minute-by-minute coverage below.
The first leg of the first Champions League semi-final certainly did not disappoint, with Liverpool running riot against Roma before handing them a glimmer of hope late on in their 5-2 win last night, and with the level of talent on show tonight we will hopefully be in for some more world-class action.
Ronaldo's tally of 42 goals in all competitions this season is not out of the ordinary for his standards, but his recent form must be up there with the very best of his career. He has evolved into the most potent of penalty-box strikers, and comes into this match having scored in each of Real Madrid's last 12 games, netting a staggering 22 goals in that time - not to mention four assists.
Ronaldo has also scored in his last 11 Champions League games - including all 10 so far this season - which is another record, and his last 15 outings in this competition have yielded no fewer than 25 goals. He is the only Madrid player to have played every minute of this season's competition so far.
The 33-year-old has been the scourge of Bayern Munich in the past too, scoring seven goals in his last three appearances and nine overall. The only player to have scored more goals against a single opponent in the competition is... Ronaldo against Juventus (10).
He truly is an incredible talent, and this competition in particular seems to bring out the best in him.
Lucas Vazquez and Isco look like they will be playing in a three up front with Ronaldo, while Modric, Casemiro and Kroos make up the midfield trio behind them. Kroos is, of course, a former Bayern player, turning out 130 times for the club between 2007 and 2014.
That is one of only two changes from that scare against Juventus, with Vallejo dropping out along with Bale as Ramos and Vazquez come into the team.
The Polish striker has scored 18 goals in 17 games for Bayern so far this calendar year and has been particularly prolific here at the Allianz Arena, finding the back of the net 25 times in his 21 home games this season.
Indeed, this match actually pits the two top scorers in Champions League semi-final history against each other, with Lewandowski's tally of six bettered only by Ronaldo's whopping 13-goal haul at this stage.
As expected, Rafinha - who played on the right side of defence at the weekend - switches back to the left, as he did in the quarter-final against Sevilla. That allows Joshua Kimmich to return at right-back, while Boateng and Hummels remain in the middle.
Arjen Robben is another with ties to the opposition, having scored 11 goals in 50 games for the club between 2007 and 2009.
Indeed, it is exactly the same lineup that Jupp Heynckes chose in his side's last match in this competition as they confirmed their place in this semi-final with a 0-0 draw against Sevilla.
A 3-0 defeat to PSG earlier in the campaign left many doubting their chances to add another title to their collection, while there have been enough major stories elsewhere - from the early exits of Barcelona, PSG and Manchester City, Madrid chasing their third consecutive title and Liverpool and Roma both upsetting the odds on their way to the semi-finals - to distract from what Bayern have been doing so far.
Bayern have already wrapped up a record sixth straight Bundesliga title - doing so with five games to spare - and reached the DFB-Pokal final in emphatic fashion last Tuesday too, thrashing Bayer Leverkusen 6-2. Many fans would not have expected that when they began the campaign so poorly that they sacked Carlo Ancelotti, but Heynckes has turned them into a major force once again.
Heynckes started with a nine-game winning streak and now comes into this one having lost just one of this last 26 outings - including 23 wins. That defeat came at the hands of RB Leipzig, but since then Bayern have won six and drawn one of their last seven games across all competitions.
Bayern had won seven Champions League games in a row prior to that draw, although they have already been beaten in this season's competition - and in handsome fashion too as PSG ran out 3-0 winners in the group stages. Indeed, Bayern only went on to finish second in their group, before thrashing Besiktas and squeezing past Sevilla in the knockout rounds.
Indeed, Bayern have had pretty miserable luck against Spanish teams in the last few years, with their elimination from this competition coming at the hands of a team from La Liga in each of the past four seasons - including twice by Real Madrid.
Bayern's home record in the Champions League has also been good with just one defeat in their last 22, stretching back to April 2014. However, that solitary defeat did come at the hands of Real Madrid last season, ending Bayern's Champions League-record run of 16 successive home wins.
Indeed, Madrid have now inflicted Bayern's last two home defeats in this competition, and you have to go back to December 2013 for their last loss against visiting opposition other than Los Blancos.
In all this will be their 19th European Cup/Champions League semi-final, and they have won 10 of the previous 18. They are under the stewardship of a man who has won this competition twice before, though, and it just so happens that his titles came with the two teams on show tonight - Real Madrid in 1998 and Bayern in 2013.
Madrid last year became the first time to retain the trophy in the Champions League era, and they are now looking to become the first team to lift it three years in a row since Bayern managed the feat between 1974 and 1976.
Madrid surrendered their La Liga title meekly to fierce rivals Barcelona some time ago and were also dumped out of the Copa del Rey relatively early, so this is really all that is left for them, despite having also won the Club World Cup this season.
A Champions League victory may still give them some bragging rights over Barcelona, despite sitting 15 points behind them in La Liga.
Madrid were also forced to survive an almighty scare in their quarter-final, despite seemingly wrapping the tie up in the first leg. A 3-0 win over Juventus in Turin should have been enough to allow Madrid to coast into the last four, but they then found themselves 3-0 down going into the stoppage time of the second leg.
A controversial penalty followed, though, and after Gianluigi Buffon had been sent off for his protests, Ronaldo picked out the top corner with ice-cold accuracy to give his side a 97rth-minute passage through to the semis.
Madrid have lost twice already in the Champions League this term, against Spurs and Juventus, although if they do manage to reach their final then it would be hard to argue with it as they have had a very difficult route so far.
After being drawn alongside Spurs and Borussia Dortmund in the groups, Madrid then faced tournament favourites PSG in the last 16, winning 5-2 on aggregate before their dramatic triumph over last season's runners-up Juve.
Madrid have, however, already beaten the likes of Dortmund, PSG and Juventus on the road in this competition already this season, with their only defeat coming at the hands of Spurs. Victory tonight would see Madrid win four Champions League away games in a row for the first time since 2015.
Bayern are no rookies in this competition, but Los Blancos do still have the experience on their side - this will be their eighth successive semi-final in the Champions League and 29th overall, winning 15 of the previous 28, including each of the last two.
Interestingly, this game pits two of the top three managers in Champions League history against each other when looking at win percentages. Of people to have taken charge of more than 20 Champions League games, only Luis Enrique (73%) has a higher percentage than Heynckes (71%) and Zidane (67%).
This should be a cracking contest, and it is one which could go either way. Bayern are ruthlessly efficient under Heynckes, but it is so hard to back against Madrid in this competition - particularly with Ronaldo in such blistering form. I'm going to have to sit on the fence and go for a draw as it is just too hard to call.
SPORTS MOLE SAYS: Bayern Munich 2-2 Real Madrid
Indeed, it will be the seventh time the two sides have met in the semi-finals, with Bayern edging that record 4-2. Overall it is very even, though, with both sides having won 11 of the 24 previous contests and Real Madrid scoring 37 goals to Bayern's 36.
Overall against Spanish opposition Bayern have won 18 and lost just three of their 27 home games, while in two-legged ties they have won 10 and lost 10 - including their victory over Sevilla in the last round.
That also includes Madrid inflicting Bayern's heaviest ever home European defeat as recently as the 2013-14 semi-finals, when Los Blancos ran out 4-0 winners en route to La Decima. Overall, though, Madrid record in Germany is fairly poor, with 19 defeats from their 32 previous visits - despite winning their last six ties against German opposition.
BAYERN MUNICH STARTING XI: Ulreich; Kimmich, Boateng, Hummels, Rafinha; Javi Martinez, Robben, Muller, Rodriguez, Ribery; Lewandowski
REAL MADRID STARTING XI: Navas; Carvajal, Varane, Ramos, Marcelo; Modric, Casemiro, Kroos; Vazquez, Ronaldo, Isco
The Allianz erupts!— Football on BT Sport (@btsportfootball) April 25, 2018
Joshua Kimmich hammers Bayern into the lead! 🙌
What an assist from James Rodriguez 👀 pic.twitter.com/DyoD0oYl2U
Ramos pings a ball across to the right side of the field where Carvajal nods it back across the edge of the area. Ronaldo decides against another bicycle kick, but the loose ball drops to Marcelo, who picks out the bottom corner with a lovely crisp strike.
Bayern have created the vast majority of the chances, but somehow they find themselves level at the break following a late goal from Marcelo just before half time. The first goal changed the game in Bayern's favour, and the hosts will not be hoping the opposite is not true of the Madrid goal.
Bayern suddenly burst into life and hit Madrid with a quick counter, though, as Kimmich raced through down the right channel. Madrid still had the situation under some semblance of control at that stage, but Navas gambled that Kimmich would cross the ball, allowing the German to beat the keeper at his near post. It was another shocker from Navas, and one that could prove important.
A long pass forward from Ramos picked out Carvajal, whose header should not have been allowed to go as far as Marcelo. There was some static defending from Bayern, though, and when it eventually fell to Marcelo the Brazilian drilled a fine finish into the bottom corner.
What an equaliser!— Football on BT Sport (@btsportfootball) April 25, 2018
Just Marcelo doing Marcelo things...
That technique! 😍 pic.twitter.com/CY1wkx2szE
Muller, Ribery and Hummels have all squandered other openings for Bayern, who suddenly came to life after their opening goal. The hosts will be scratching their heads and wondering just how they are not ahead at this halfway stage.
Bayern have the situation in control until Rafinha plays a suicidal square ball straight to Asensio, leaving Real Madrid with a two-on-one scenario. Asensio gives it to Vazquez before receiving the return ball and keeping his composure to clip his finish past the keeper.
3 - Marco Asensio's last three Champions League goals have all been as a substitute in knockout matches. Impact. pic.twitter.com/e79V9vdpVb— OptaJoe (@OptaJoe) April 25, 2018
Bayern Munich took the lead through Joshua Kimmich in the first half, but they were made to rue a string of missed opportunities when Marcelo levelled things up just before half time. Marco Asensio then came off the bench to score the winner in the second half, putting Real well in the driving seat to reach yet another final.
Thank you very much for joining Sports Mole for tonight's match as Real Madrid take a giant stride towards the final of the Champions League courtesy of a 2-1 win over Bayern in Munich. I will leave you with our match report, and be sure to stick around for reaction too.
From me, though, it is goodbye for now!