One of the biggest shocks in European football history looked a real possibility when Blaise Matuidi took advantage of Keylor Navas' dropped cross to make it 3-3 on aggregate just after the hour mark.
But English referee Michael Oliver penalised Medhi Benatia for a foul on Madrid forward Lucas Vazquez inside the Juve area and their 40-year-old captain flew into a rage.
Ronaldo showed he can wait, and not be exhausted of waiting, as Buffon's replacement, Wojciech Szczesny, took an age to ready his gloves and prepare himself for the penalty kick that referee Michael Oliver awarded correctly.
"The first leg had given me confidence we could do this and the side deserved at least extra time", Juventus coach Massimiliano Allegri said.
'Lucas was tackled from behind and if they don't give him the penalty, it's a goal'.
Croatian striker Mandzukic grabbed an away goal and a lifeline in the tie after just 90 seconds in the Spanish capital and the Juve frontman slashed the deficit to 3-2 on aggregate in the 37th minute.
Regarding the events at the Bernabeu, Ronaldo added: "We have suffered, but it helps us to learn".
Under enormous pressure of the occasion, Cristiano Ronaldo showed admirable composure and smashed the ball right into the net securing Real's spot in the semis.
With substitute keeper Wojciech Szczesny on the goal line, Ronaldo sent a blast into the top corner to win the tie for Real Madrid with his 15th goal of the current Champions League campaign.
It drew parallels with Real boss Zinedine Zidane when his France playing career ended with a sending off at the 2006 World Cup final for a headbutt on Italy defender Marco Materazzi. "The ref awarded it and we can't change that, but I think it was a penalty", Zidane said.
"I'm disappointed that they say we're through because of the referee".
MUNICH (AP) - Bayern Munich reached its sixth Champions League semifinal in seven seasons with a 0-0 draw against Sevilla in the second leg of their quarterfinal on Wednesday.
"But we are happy and we are in the semi-finals".
"I have seen some of their games, it's surprising they are bottom of the table, but our aim is to go there and win".