Barca and Atletico drew 0-0 in Saturday's top-of-the-table clash at the Calderon and Real took full advantage to end the first half of the season on 47 points from 19 matches, with the leaders on 50 and Barca top on goal difference.
It was left to Ronaldo's Portugal team mate Pepe to secure the win when the centre back was left unmarked in the 55th minute and headed a Luka Modric free kick into the net.
Espanyol barely troubled Real keeper Diego Lopez and Real should have doubled their lead late on when Ronaldo sliced a shot wide with the goal at his mercy.
The woes of bottom side Real Betis deepened when they were beaten 2-1 at home to Osasuna as both sides had a player sent off and Betis forward Ruben Castro missed a penalty.
Rayo Vallecano, one place above Betis in 19th, pulled five points clear of the struggling Seville-based side, level on 16 with Real Valladolid, thanks to a 1-0 win at Madrid-based rivals Getafe.
Malaga and Levante, who each have 20 points in 13th and 14th respectively, play at Levante's Ciutat de Valencia stadium later on Sunday (2000 GMT).
- Sports & Recreation
- Cristiano Ronaldo
- Real Betis
- Gareth Bale