A bizarre Sergio Ramos own goal forced the extra period after Robert Lewandowski opened the scoring for Bayern from the penalty spot and Ronaldo equalised.
Marcelo twice cleared off the line for Madrid and Jerome Boateng did the same for Bayern in a thrilling game, which was tilted in Madrid’s favour by Arturo Vidal’s dismissal for two yellow cards, the second of which was harsh.
Ronaldo put Madrid level at 2-2 on the night in the first period of extra time when he scored his 100th Champions League goal, from a clearly offside position, before he wrapped up his treble with another disputed goal and Marco Asensio added a fourth.
Bayern coach Carlo Ancelotti was furious, criticising Hungarian referee Viktor Kassai after the game and asking for the introduction of video technology.