Real's victory moved them temporarily three points ahead of Barca, who play later on Saturday, with the first El Clasico of the campaign taking place on December 18.
And the pair were involved in Real's best moments early on as they tried to break down an Espanyol side that had not won in the league since October.
Real, wearing their green third kit rather than their usual white to raise climate change awareness, had their first effort in the sixth minute when 19-year-old Vinicius cut inside from the left and forced a save out of former Real goalkeeper Diego Lopez.
Six minutes later it was the turn of Rodrygo to have a sight of goal, but when a corner was cleared to him on the edge of the area, the 19-year-old curled an effort harmlessly wide.
Soon after, Vinicius charged forward before slipping in Benzema down the left but the former France striker shot harmlessly at Lopez.
Espanyol had their first real sight of goal in the 27th minute when Esteban Granero's header forced Thibaut Courtois into a diving save, but seconds later Real had broken down the other end and Lopez had to extend his left foot to keep out Vinicius.
Real finally found a way through eight minutes before half-time and it came from an unlikely source. Benzema threaded a ball into Varane, who was still forward following a corner, and the centre-back slotted low into the far corner for his first club goal since March.
Vinicius went close again two minutes before half-time following another rapid Real counter, but Lopez again used his feet to keep the ball out.
Real pushed for a second to kill the game after the break, with left-back Mendy firing wildly over from the edge of the area and Benzema forcing another impressive save from Lopez.
Benzema should have settled the game with 19 minutes left but, after brilliant work by Vinicius down the left, the striker failed to hit the target from near the penalty spot.
Espanyol were still in the game and Courtois had to be alert to save Marc Roca's long-range effort with 13 minutes left.
But Benzema made the game safe in the 79th minute, lashing home from close range after exchanging passes with Federico Valverde in the penalty area.
Real had Mendy dismissed after he picked up a second booking in the 83rd minute, but Espanyol were unable to cause any problems as the game petered out.