But which players impressed and who disappointed? These are the player ratings for both sides.
Claudio Bravo (goalkeeper) - 6
Had little chance with either of Real's goals, and punched out a drive from Cristiano Ronaldo in the first half. Solid enough when dealing with crosses and blameless in defeat.
Dani Alves (right back) - 6
Mindful of the threat posed by Ronaldo down his flank, the Brazilian was more restrained than usual in coming forward, and Barca perhaps suffered from his reduced service to Lionel Messi. Fired a long-range blaster over the bar.
Gerard Pique (centre back) - 7
Scored Barca's goal with a good header from a corner and generally defended well, making one excellent block to deny Benzema. Will have been frustrated to see Toni Kroos' deflected cross skim over his head and drop for Benzema to equalise.
Javier Mascherano (centre back) - 6
A typical battling display from the Argentine, who was rightly shown a yellow card for a crude challenge on Gareth Bale. Generally contained Benzema but looked occasionally vulnerable against Ronaldo and Bale's inside bursts.
Jordi Alba (left back) - 5
A match-up of two speedsters with Bale and he came off second best. Offered little coming forward and was fortunate to see Bale have a header disallowed for a supposed push after being beaten in the air. Also beaten by Bale's cross for the winner.
Ivan Rakitic (midfield) - 7
Forced a good save from Keylor Navas with a left-footed shot in the first half, and delivered the corner for Pique's goal. A classy performance and the team deteriorated when he was replaced by Arda Turan.
Sergio Busquets (midfield) - 6
An unflappably calm presence in the centre of midfield when Barca were on top, with his precise and unfussy passing keeping his team's rhythm. But found himself overrun in the latter stages as Madrid grew in strength.
Andres Iniesta (midfield) - 6
Some typically wispy runs from the dribbling wizard, who also had a powerful shot blocked by Ramos in the first half. But he was rarely able to penetrate the visiting defence and declined in influence as the game went on.
Lionel Messi (right wing) - 7
Played a little deeper and more centrally than usual but, as always, the Argentine was at the heart of his team's attacking efforts. Came close with two free-kicks, had a penalty appeal waved away and forced a good save with a deftly clipped shot.
Luis Suarez (centre forward) - 5
A night to forget for the Uruguayan, who missed an absolute sitter in the early stages, was shown a yellow card for throwing his arm in Pepe's face and struggled to get much change out of Pepe and Ramos.
Neymar (left wing) - 6
Made a very strong start, setting up early chances for Suarez and Iniesta, also curling a tough chance well over the bar. But he faded badly after the break and was regularly caught in possession in a weak second half showing.
Arda Turan (for Rakitic) - 5
Introduced for Rakitic but made little impact, with Barca losing control of the contest after he appeared. Had a late half-chance to level but saw his shot blocked.
Keylor Navas (goalkeeper) - 7
The Costa Rica international has been outstanding this season after his club's botched attempt to sign David de Gea in the summer, and he delivered again here with two outstanding diving saves to deny Rakitic and Messi.
Dani Carvajal (right back) - 6
Was booked early for a lunge on Iniesta and initially struggled badly against Neymar. But he responded well to finish the game strongly, playing a role in the winner by feeding Bale.
Sergio Ramos (centre back) - 7
Sent off in the latter stages after being booked for dissent and a foul on Suarez, but still played a full part with a committed and physically fearless performance. Made one great last-ditch challenge on Messi, prompting calls for a penalty that were rightly turned down.
Pepe (centre back) - 7
The Portuguese powerhouse largely performed with resilience and determination to frustrate Suarez, but he was lucky to get away with a poor hashed clearance in the first half which resulted in Rakitic forcing a good save from Navas.
Marcelo (left back) - 6
Was overworked in defence initially but slowly became more of an attacking force as the game went on, acting as the catalyst for the equaliser with a driving run to find Kroos. Appears to be blessed with never-ending supplies of energy.
Luka Modric (midfield) - 6
Maybe lucky to escape an early booking for a foul on Busquets as his frustration at Barca's dominance became evident. But he never stopped working for his team and performed tidily in the second half.
Casemiro (midfield) - 6
Looked like a rabbit in the headlights during the early stages, when his technical deficiencies were laid bare as a number of passes went astray. But he is in the team for his defensive abilities and he played a key role in that respect, protecting his back four well.
Toni Kroos (midfield) - 7
Like Modric, he looked overwhelmed in the opening stages and couldn't get near the ball. But, reflecting his team's overall performance, he gradually gained strength and delivered the cross for Benzema's equaliser.
Gareth Bale (right wing) - 8
Man-of-the-match performance from the Welshman, who was his team's most dangerous player all night, regularly troubling Barca with his powerful running. Unlucky to see a header disallowed for a supposed push and picked out Ronaldo with a deep cross for the winner. Maybe his best game for the club.
Karim Benzema (centre forward) - 6
Couldn't get involved at all in the first half, barely touching the ball before slicing a glorious chance over the top. Continued to contribute little but rescued another otherwise poor performance with an excellent finish for the equaliser. Substituted soon after.
Cristiano Ronaldo (left wing) - 6
Virtually nothing went right for the Portuguese star, whose frequent attempts to run at the home team defence generally led him down cul-de-sacs. But his frustrating night took a drastic turn for the better when he pounced for the winner, crisply finishing Bale's cross.
Jese Rodriguez (for Benzema) - 6
Came on at a perfect time as Barca were starting to tire, and took full advantage with his fast and direct running contributing to his team's late dominance.
Lucas Vazquez (for Bale)
A late time-wasting sub, with no chance to make an impact.