The Frenchman had to be substituted shortly before the half-hour mark at Ipurua after suffering a clash of heads with Eibar striker Kike García minutes earlier.
His double means Ronaldo has now scored in seven consecutive games and has a remarkable 13 goals overall in that period.
They were below their best and rode their luck late on when Eibar should have converted a pair of excellent chances, before Ronaldo made them pay.
But he returned just in time to see in-form Cristiano Ronaldo grab his second goal of the match - and 33 of the season - to secure a 2-1 victory.
With the score locked at 1-1 after Ivan Ramis cancelled out Cristiano Ronaldo's first-half opener, the Spain global left the field in the 73rd minute.
Isco and Casemiro formed the top and tail of a midfield diamond.
And the visitors were ahead after 34 minutes when Modric intercepted a pass from Anaitz Arbilla before playing a sumptuous through-ball for Ronaldo to drill home at the near post.
Just before the break, Ronaldo forced a stunning stop out of Dmitrovic after his 20-yard strike was deflected on goal, with Sergio Ramos sent a free header wide of the post from no more than 10 yards out.
Bale had a chance to restore Real's lead in the 63rd minute but his header sailed inches wide of the upright.
First, the unmarked Inui headed over from seven yards out and then Kike hit the side-netting with only Keylor Navas to beat. They would soon prove costly misses.
But it was right back Dani Carvajal who intercepted a pass by Leon and crossed for Ronaldo to head in his second goal with six minutes remaining.