© Getty Images
The home side could have taken a shock lead in the early moments of the game after Felipe Caicedo burst clear on goal, but under pressure from Sergio Ramos, the Ecuadorian could only force a save out of Keylor Navas.
However, Real went in front after seven minutes through Ronaldo, who latched on to a pass from Luka Modric before applying the finish past the goalkeeper.
© Getty Images
The Portuguese star's hat-trick was complete after just 20 minutes when he was in the right place at the right time to convert from close range after a cross from Bale.
Espanyol were shell-shocked, but they nearly pulled a goal back when Salva Sevilla fired an effort on goal, but his shot was gathered at the second attempt by Navas.
Less than 30 minutes were on the clock when Real bagged their fourth thanks to Karim Benzema, who tapped home inside the penalty area after being found by Ronaldo, who had been given acres of space on the left.
The second half began slowly, with both sides aware that the match was effectively over as a contest, but on 62 minutes, Ronaldo scored his fourth, and Real's fifth, from close range with Bale again providing the assist for his strike partner.
As the game entered the final quarter of an hour, Espanyol should have registered a consolation after Sevilla had been found in the penalty area but his header was straight at Navas.
With 10 minutes left, Ronaldo notched his fifth of the afternoon after good work from Lucas Vasquez provided him with the chance to rifle a first-time shot past a helpless Pau Lopez in the Espanyol net.