Ramos left the field to go to the toilet after 73 minutes at the Ipurua Municipal Stadium, with the match delicately poised at 1-1.
The Spaniard had been at fault for Eibar equaliser earlier in the second half, allowing Ivan Ramis to head in an equaliser from a corner.
But, with Ramos back on the pitch Cristiano Ronaldo headed in his second of the game as Real snatched a 2-1 win.
After the match, Zidane said: "Sergio went to the bathroom for a minute and then returned, nothing more."
Real's win in La Liga moves them to within four points of second-placed Atletico Madrid, who play at home to Celta Vigo on Sunday.
Meanwhile, Lionel Messi announced that he and his wife Antonella Roccuzzo had become parents for a third time on Saturday.
"Welcome Ciro!!! Thank God, everything went perfectly. He and his mummy are doing very well. We are super happy!!!" wrote Messi on his Instagram account, accompanying the post with a photo of the baby's hand.
Ciro is a brother to five-year-old Thiago and Mateo, who is two.
Messi had pulled out of Barcelona's squad for Saturday's La Liga match at Malaga to be present for the birth.
The club tweeted: "Change to the squad. Messi is out for personal reasons and Yerry Mina takes his place."