A second goal would have led to Real being in full control of the contest but within six minutes of the restart, Eibar were back on level terms as Ramis sent a header into the net from 10 yards after meeting Leon's corner.
Victory means the reigning Spanish champions have won eight of their last nine matches in all competitions.
The win has now temporarily closed the gap between Real and their fierce rivals Atletico Madrid to four points as Zidane's side look to stay in touching distance of the top two.
"He's an important player and there are other players in the team that are also important", Zidane told a news conference ahead of his side's Liga game away to Eibar on Saturday.
Eibar appeared to target Madrid's full-backs and their crosses from both flanks continued to trouble, even if they often just missed the intended target.
Ronaldo's goals were his 17th and 18th in the league this season.
Spring Ahead - Daylight Saving Time To Return
Northen areas of South America also do not use DST, while the southern areas like Brazil and Paraguay do observe the time change. On the other hand, during the day when there is sunlight, we want to be awake, and that is when levels are at their lowest.
Having already lost Raphael Varane to a head injury, Ramos headed off the pitch in the 73rd minute, causing confusion amongst media and spectators as Madrid had used all three substitutes.
Ronaldo broke the deadlock in the 34th minute when he controlled a Luka Modric pass on his chest before breaking into the area and scoring.
From the resulting corner, Bale got above the Eibar defence, only to divert his glancing header wide of the post, but the opportunity suggested that the visitors were starting to up the tempo.
Isco and Kroos made way for Benzema and Lucas Vazquez with 19 minutes left but Eibar had two golden chances to score a second.
However, Ronaldo was perfectly placed late on to snatch the win for the visitors, as Dani Carvajal's cross found its way to the forward with five minutes remaining.
Real Madrid's form prior to the last 16 clash against the French giants raised many questions as to whether they could withstand the attacking strength of Unai Emery's side.