Already leading 3-0 from last week's first leg, Ronaldo's eighth-minute strike looked to have Jose Mourinho's men comfortably through to the semi-finals.
But three goals in 15 second-half minutes from Emmanuel Eboue, Wesley Sneijder and Didier Drogba set up a tense finale.
Real substitute Alvaro Arbeloa saw red for two bookings before Ronaldo scored again in the closing seconds to seal a 5-3 aggregate success despite a 3-2 defeat on the night.
"It is our own fault it became complicated," the Portugal sensation told Spanish TV station TVE.
"In football you cannot gift anything. Today that is what happened and it ought to serve as an example for the future to play for 90 minutes."
Ronaldo scored his 47th and 48th goals of another stunning season to ensure Real's name will be in the hat for Friday's semi-final draw.
He added: "The team is fine, they gave me good passes and I did my job, which is to score goals.
"We are very happy to have qualified. We have achieved our objective and now we wait to see who we will play next."