After a goalless first half, Papa Baba Diawara gave Levante a lead which was swiftly cancelled out by Sergio Ramos.
Levante struck in the 86th minute through Nabil El Zhar only for Madrid substitute Alvaro Morata to again restore parity in the 90th minute before a deflected strike from Ronaldo - whose last-gasp penalty sank Elche last week - sealed another dramatic win.
Real coach Carlo Ancelotti said: "We have to review this match, because it was not good from a tactical and technical point of view. We reacted fantastically at the end of the match. With players with that attitude, fighting all the time, the game is not hard to improve and we need to.
"The win was very important because the match was very difficult. At the end we did not give up and that gave us the three points. It is true that we did not play fantastic football, but we deserved to win in the end."
For breaking stories and all the great banter like us on Facebook: facebook.com/tribalfootball