Neymar stunned a packed and hostile Bernabeu with a superb goal to give Barca a fourth-minute lead before Cristiano Ronaldo levelled with a penalty in the 35th, the first goal the Catalan side had conceded in nine league outings this term.
Pepe made it 2-1 to the European champions six minutes into the second half and a misunderstanding between Andres Iniesta and Javier Mascherano led to Real’s third after the hour when Karim Benzema finished off a swift break with a clinical strike.
Barca is top with 22 points and Real, which had an early-season wobble but has been in scintillating form in recent weeks, second on 21. Sevilla, which hosts Villarreal on Sunday, is third with 19.
There was no dream return for Luis Suarez, making his Barca debut after a four-month ban for biting an opponent at the World Cup.
The Uruguay forward looked reasonably sharp and had a hand in Neymar’s goal but did not come close to scoring himself before being replaced by Pedro midway through the second half.
Barca’s four-times World Player of the Year Lionel Messi also had a quiet night by his standards and remains one goal short of the La Liga scoring record of 251 goals set by former Athletic Bilbao forward Telmo Zarra six decades ago.
In a match watched by millions around the globe and showcasing many of the world’s best and most expensive players, Barca drew first blood with a splendid effort from Neymar, the Brazilian’s ninth of the season. Suarez picked him out on the left wing with a raking pass and Neymar skipped past challenges from Dani Carvajal and Pepe before firing into the corner past Iker Casillas.
Real immediately upped its game and Benzema came close to a leveller when he headed against the crossbar before smashing the rebound off the corner of the goal frame.
Casillas pulled off a superb save to deny Messi in the 23rd minute after Suarez had sent over a teasing low cross and Pepe cleared just as Neymar was preparing to nod home before Real was awarded a penalty.
Barca centre-back Gerard Pique slipped and handled a Marcelo cross and Ronaldo sent Claudio Bravo the wrong way for his 16th La Liga goal in eight appearances this season.
It was the 11th consecutive game the Portugal forward has scored for Real, his best run since joining from Manchester United in 2009.
Real edged ahead six minutes into the second half when Pepe was given too much space at a corner and headed powerfully past Bravo and Barca then shot itself in the foot with a bizarre blunder by Iniesta and Mascherano near the edge of the pitch that gifted possession to Isco.
The Spanish playmaker raced clear and the ball eventually found its way to Benzema who smashed it past Bravo off a post.
It was no more than Real deserved and although Barca pressed hard to force a way back into the game, it barely troubled the home goal again.
It was Real’s 71st victory in 169 Clasicos since the arch rivals first clashed in the Spanish top flight in 1929. Barca has won 66 with 32 draws.
The results: Real Madrid 3 (Ronaldo 35-pen, Pepe 50, Benzema 61) bt Barcelona 1; Almeria 0 lost to Athletic Bilbao 1 (Etxeita 56).