Zinedine Zidane's charges were dominating possession after 15 minutes, having sustained pressure on Barça in the last third.
Luka Modric had a dominant influence on the game for the hosts after 25 minutes but they could not create clear goal scoring opportunities.
In the 29th minute, Paulinho almost opened the scoring iwith an out-stretched half-volley inside the box but it sailed over the bar.
Ronaldo had a glorious chance to put Real ahead after finding space at the back post, but Marc-Andre ter Stegen made a brilliant save.
Barça were finding opportunities on counter-attacks and Paulinho almost punished Los Blancos three minutes before the break with a well timed header at close range but Keylor Navas made a good save.
Luis Suarez broke the deadlock 10 minutes after the break with a composed finish from 12-yards after he was teed up by Sergi Roberto.
Los Blancos were reduced to 10 men in the 62nd minute after Daniel Carvajal was shown a straight red card for blocking a goal-bound header from Paulinho with his hands inside the box and a penalty was awarded.
Messi stepped up for the spot-kick and rifled a left-footed strike into the left-side of the goals, 2-0 to Barça.
Ernesto Valverde's troops were cruising after 75 minutes and were in no rush to go forward.
Gareth Bale almost reduced the deficit shortly after coming on for Mateo Kovacic, but the Welshman could only fire straight at Ter Stegen from close range.
Substitute Aleix Vidal made it 3-0 in stoppage time with a stinging shot from inside the box, Navas got a hand to the shot but spilled it into the back of the net as the Catalan giants ran out 3-0 winners on the day.