Ronaldo treble sends Real 10 points clear
A fifth-minute Gustavo Cabral header gave Levante, the only team apart from Barca to beat Real this season, a surprise lead at the Bernabeu before midfielder Vicente Iborra handled the ball in the area after 43 minutes and was shown a second yellow card.
Ronaldo smashed the penalty into the corner of the net for the equaliser, his 21st successful spot-kick in a row.
The Portuguese forward put the home side ahead when he nodded in a Gonzalo Higuain cross five minutes into the second half.
Ronaldo then completed the hat-trick, his 13th since joining Real for a world-record fee in 2009, with a dipping drive seven minutes later. It was the 27th goal of the campaign for the league's top scorer.
Levante pulled a goal back in the 63rd minute when Arouna Kone, who netted in a 1-0 home win over Real in September, finished off a fine breakaway by heading past Iker Casillas before Karim Benzema secured victory three minutes later.
It was Real's seventh straight league victory since they were beaten 3-1 by Barca in December. Their 17th win in 18 games also gave Jose Mourinho's side 58 points from 22 matches.
Barca, who crashed to a shock 3-2 defeat at Osasuna on Saturday, have 48 points. The champions are eight ahead of third-placed Valencia who thumped struggling Sporting Gijon 4-0 on Sunday.
Levante are fourth on 32 points, level on points with fifth-placed Espanyol who lost 2-0 at home to bottom club Real Zaragoza.
Ronaldo said he was very happy to hear the Real fans chanting his name on Sunday after they whistled him earlier in the season following some below-par performances.
"We started the game badly but once we got the first goal we started to play well," he told Spanish television.
"My goals come because of the success of the team. I am scoring goals and playing well and I want to continue the same way.
"There is still a lot left in the season but we are playing well and we have to keep going to the end."
Ronaldo's treble, which put him four clear of Barca forward and World Player of the Year Lionel Messi in the league scoring chart, means he has now netted more goals for Real than for his previous club Manchester United.
The 27-year-old has 119 in 122 games for the Spanish side compared with 118 in 292 matches for United.