Real Madrid sit top of the table on nine points, level with Real Betis. Barcelona and Villarreal are right behind on seven points, with Osasuna and Real Sociedad on six.
Vinicius Jr opened the scoring early in the first half with a first-touch finish from a brilliant pass by Aurelien Tchouameni.
Joselu levelled from a rebound right before halftime and Espanyol put up a fight against the Champions League and LaLiga champions, dominating most of the second half.
Yet two minutes from time, Rodrygo found Benzema at the far post with a perfect cross and the French striker put Real Madrid back in front.
In added time, the video assistant referee spotted a foul by keeper Benjamin Lecomte on Dani Ceballos in what was considered a clear goal-scoring opportunity on the edge of the area.
Lecomte was shown a straight red card and Benzema took charge of the free kick, bending it into the bottom corner to wrap up the points.