The European champions suffered back-to-back defeats against Valencia and city rivals Atletico Madrid in the space of four days last week, bringing a club-record 22-match winning streak that began all the way back in September to an unceremonious end.
But first half goals from James Rodriguez and Gareth Bale put Real well on the road to recovery here.
Portuguese full-back Fabio Coentrao was sent off for Los Blancos at the beginning of the second half. However, Espanyol couldn't take advantage of its numerical advantage.
Instead, substitute Nacho Fernandez added a third for Real 15 minutes from time.
It could have been even more had Bale made more of a chance when put through on goal before Nacho sealed the win. But the Welsh winger failed to square the ball to Cristiano Ronaldo who appeared to be in a better position to score.
That led to jeers from the home crowd which didn't appreciate the $132 million man's selfishness in front of goal. Yet after the game, Real boss Carlo Ancelotti was quick to defend Bale when speaking to reporters.
"Bale played a very good game. He had intensity, he scored, he helped in the first goal," said Ancelotti in quotes carried by the AFP news agency.
"It could be in this moment the fans asked for a pass to Cristiano that he didn't make because, like all strikers in front of goal, they try to score.
"We have fans that demand a lot and this is good. Bale is a fundamental player like Cristiano and that is why the fans demand more of them."
The result means Real move four points clear at the top of the La Liga table, although that lead will be reduced by either second-placed Barcelona or third-placed Atletico Madrid which face off against one another in the Catalan capital tomorrow evening.
Looking beyond that, Ancelotti will be seeking harmony in the squad as Real prepare for the second leg of their Copa Del Rey last-16-tie against city rivals Atletico on Thursday.
Atletico triumphed 2-0 in the first leg at the Vicente Calderon last week and Real haven't beaten them in three attempts this season.
"We have time to prepare well," Ancelotti said.
"We'll play our strongest team because we want to turn around the result of the first leg and try our best to get to the quarter-finals.
"I think everyone is waiting for this game. It is difficult for us but we are going to play our best and playing at home will help us."