The Portugal star followed up his first-leg double at the Allianz Arena by taking his Champions League tally to 100, securing a 6-3 aggregate victory with two goals in extra time.
Carlo Ancelotti named a vastly experienced Bayern side, with Philipp Lahm and Xabi Alonso - three winner's medals between them - ultimately playing their final games in the competition before retirement.
Madrid missed the better of the chances in an engaging first half before Arjen Robben made the game's first telling contribution, winning a penalty from Casemiro to allow the returning Robert Lewandowski to score.
Casemiro made amends when he crossed for Ronaldo to level the scores but Bayern were ahead a minute later through Sergio Ramos' own goal on his 100th Champions League appearance for Madrid.
Bayern's hopes of completing the turnaround were dealt a major blow when Arturo Vidal was given a second yellow card for what looked to be a fair challenge, and the Bundesliga leaders had further cause for anger when Ronaldo drilled in his second from an offside position.
Ronaldo completed his historic hat-trick before Marco Asensio added a fine late fourth to make Madrid's win safe and send them into the last four for a record-breaking seventh season in a row.
As in the first leg, Bayern started brighter, but Marcelo denied Thiago Alcantara and Arjen Robben was off-target on the follow-up before being beaten to Thiago's throughball by Keylor Navas as the home defence was cut open.
Madrid responded well, but Benzema nodded wide after escaping Jerome Boateng - risked in the starting line-up despite injury concerns.
Manuel Neuer denied Dani Carvajal and Ronaldo either side of Boateng blocking Ramos' effort on the line as the pressure began to mount in the latter stages of the half, with Toni Kroos and Isco keeping Madrid on the front foot after the break, only for Bayern to grab a lifeline against the run of play on 53 minutes.
Casemiro's clumsy trip on Robben saw referee Viktor Kassai point to the spot, and Lewandowski swept the ball high into the net after watching Navas dive to his left.
Madrid suddenly looked nervous and Vidal sliced a volley over the bar from Robben's chip into the area, but the visitors were punished on the break when Casemiro won possession in the attacking third and clipped a fine cross to Ronaldo, who beat Lahm to the ball and headed beyond Neuer and into the bottom corner.
Yet just a minute later, Bayern levelled the tie. Substitute Thomas Muller brought the ball down in the box, with Ramos, Nacho and Navas left looking at each other after the captain bundled into his own net.
With the tie once more on a knife-edge, Madrid were again handed an advantage as Vidal earned his second booking of the night for a challenge on Asensio, despite having clearly got a foot on the ball.
Lewandowski was sacrificed for Joshua Kimmich as an open extra-time period began, with Casemiro seeing shouts for a penalty waved away before Asensio was denied at the near post by a smart Neuer stop.
Ronaldo gave Neuer no chance in the 104th minute, however, controlling Ramos' delivery near the penalty spot before half-volleying into the net left-footed; although replays showed that he had strayed offside.
And Ronaldo's Champions League ton was up soon after thanks to the selfless Marcelo, who danced through the back line and unselfishly squared to leave Neuer exposed.
Bayern's resistance was broken at last and Asensio added gloss to the scoreline with the goal of the game, driving beyond Hummels before slotting right-footed into the bottom-left corner of the net to send the holders marching into the last four.
KEY OPTA STATS
- Cristiano Ronaldo has scored more goals against Bayern Munich than any other player in Champions League history (nine).
- Ronaldo has equalled the record of goals scored against the same opponent in CL history (nine by Messi against Arsenal).
- Cristiano Ronaldo is the third player to score a hat-trick against Bayern Munich in Champions League, after Sergio Aguero for City in 2014 and Roy Maakay for Deportivo in 2002.
- Casemiro has conceded more penalties than any other player in the Champions League since the start of last season (three).
- Real Madrid have scored in their last 55 games in all competitions, the best ever run by a La Liga side.
- Sergio Ramos is now the fourth Real Madrid player to make 100 appearances in the CL (Iker Casillas 150, Raul Gonzalez 130 and Roberto Carlos 107).