Ramos had earlier been at fault for ex-Wigan defender Ivan Ramis' equalising goal.
Victory means the reigning Spanish champions have won eight of their last nine matches in all competitions.
And that miss would ultimately cost them as Ronaldo netted his second of the match, on 84 minutes, to secure a 2-1 win for Real Madrid.
But Ronaldo proved the difference again, the 33-year-old taking his tally for the season to 35 goals in 37 appearances.
Tiny Eibar are in contention for a European place next season and made the better start to the game, with Zidane admitting his side struggled in the opening stages.
Ramos celebrates in the Champions League.
Nunberg: Trump 'never did anything illegal or wrong around me'
I would guess that Nunberg has a lot of information of value to Mueller, especially in his email communications. That Nunberg actually recognizes the value and intelligence of a Black woman, is, I hope, a life lesson for him.
Isco saw a 23rd minute shot blocked inside the Eibar box, but after Joan Jordan saw his header from a Pedro Leon free-kick fly just wide of the target, Real found themselves in the lead, very much against the run of play.
In front, Real improved but five minutes into the second half and Eibar were level.
Isco and Kroos made way for Benzema and Lucas Vazquez with 19 minutes left but Eibar had two golden chances to score a second.
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.
Eibar conceded possession in manner like they did in the build-up to Real's first goal and the Portuguese nodded home the crucial goal off a Dani Carvajal cross.