Real Madrid lead the Spanish table by just one point after the 22nd round. The Champions League winners suffered their third defeat at Espanyol Barcelona.
Carlos Romero scored in the 85th minute for FC Barcelona's relegation-threatened city rivals, who had just 24% possession, thwarted 21 shots on goal and hit the post twice.
It was Real's first league defeat since the beginning of December. Atlético Madrid (2-0 against Mallorca) closed the gap in the table as a result, while FC Barcelona can move to within four points with a win against Alaves on Sunday.