The European champions made it four wins from five matches thanks to Marco Asensio's strike late in the first half of Saturday evening's encounter.
Three days on from cruising past Roma at the same ground, Real struggled to find top gear and were nearly made to pay as Borja Iglesias hit the crossbar with his second-half attempt.
Lopetegui admits that his side were 'made to suffer' by Espanyol, which he believes is a key trait for any champion.
"The league has complex matches and this was one of them," he told reporters. "It's what the league has. We knew it. The most positive thing is that the team has taken the three points, has known how to suffer, you also have to do it to win a league.
"The main reading is that we have known how to suffer because we also have not been able to close it. Espanyol closed us down, but also knew how to attack.
"But what has hurt us the most is losing control. The team have made a great effort and has achieved three very important points."