The tiny Basque club continued to press, but they were made to rue their missed opportunities when Ronaldo steamed into the box to get on the end of a Dani Carvajal cross into the box and head home from close range.
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. Ivan Ramis had equalised for Eibar shortly after half-time.
Eventually Madrid appeared to exert a degree of control and Ronaldo - following a moment of Luka Modric inspiration - opened the scoring in the 34th minute, continuing his brilliant recent form.
Joan Jordan also squandered a headed opportunity after meeting Leon's outswinging free kick but as the first half progressed, Real began to stamp their authority on the fixture.
Eibar had a number of chances to win the tie, but Ronaldo popped up late on to secure all three points for his team.
Elizabeth Hurley's Nephew Miles Stabbed Multiple Times in London
They were both taken to a hospital "where their conditions are described as not life-threatening or life-changing", police said. The star was pictured arriving Heathrow on Friday morning and is thought to now be at Miles' bedside with sister Kate.
Ronaldo headed in an 84th-minute victor at the Ipurua Municipal Stadium, having earlier put Real in front with an emphatic near-post finish.
But Ronaldo proved the difference again, the 33-year-old taking his tally for the season to 35 goals in 37 appearances.
Ronaldo couldn't poke a 54th minute shot with the outside of his boot on target following some good build-up play, while Modric probably should have passed to an unmarked Ronaldo at the back post after breaking through the Eibar defence, and pulling his shot just wide.
Keylor Navas then had to be at his best in the 19th minute, tipping Kike's 20-yard effort just past the post.