The Spaniard had been at fault for Eibar´s equaliser earlier in the second half, allowing Ivan Ramis to head in an equaliser from a corner.
Eibar went close once more after great footwork in the middle of midfield by Joan Jordan created space for a quick break and after a neat backheel from Inui, Kike fired in a curling effort from the edge of the area, which Keylor Navas was forced to tip around the post.
Not the flawless situation at the best of times; however, Ramos' plight could have been made even worse in Madrid's famous all-white dress.
Raphael Varane had to be replaced by Nacho after taking a bang to the head and, against the run of play, Real edged ahead in the 33rd minute.
Eibar pushed Madrid back in the first half but were made to pay for a mistake on the half-hour when Luka Modric set up Ronaldo to open the scoring.
Ronaldo's goals were his 17th and 18th in the league.
Ronaldo had two more excellent chances - on either side of Ramis' equalizer - to grab another goal but was denied by superb one-handed saves from goalkeeper Marco Dmitrovic.
It happens to the best of them, just ask Gary Lineker.
Isco and Kroos made way for Karim Benzema and Lucas Vazquez with 19 minutes left but Eibar had two golden chances to score a second.
The galloping Ronaldo met an inch-perfect cross from Daniel Caravajal to head home past Dmitrovic.