Azulgranas continued to open up Real as Jordan nodded Leon's free-kick wide of the post on the half-hour mark, but there were signs from the visitors as Gareth Bale was denied by goalkeeper Dmitrovic after being played through by Marcelo.
Dmitrovic produced another wonderful save to thwart Ronaldo from 12 yards after a great cross from Bale before the Welshman glanced a header just wide of the far post as a second Madrid goal looked imminent.
Ronaldo has roared back from a feeble start to the season, when he scored just once in his first eight league games, to reach 18 goals in the campaign. That is one more score than Barcelona rival Lionel Messi.
Los Blancos remain in third but have put some pressure on Atletico ahead of their meeting with Celta Vigo on Sunday.
"For me he's from another galaxy", Real coach Zidane said.
"He is an important player for us and what he has done, he has done very well". "We knew we were going to suffer and we did, we had trouble getting hold of the ball but we fought together with character and got the win".
Later on Saturday, Valencia moved back to within a point of Real and all but ended Sevilla´s hopes of finishing in the top four by beating Los Rojiblancos 2-0.
They were below their best and rode their luck late on when Eibar should have converted a pair of excellent chances, before Ronaldo made them pay. Vincenzo Montella's side visit Manchester United on Tuesday in a last-16 second leg, with the tie finely balanced at 0-0.