Spanish Super Cup: Barcelona 3 Real Madrid 2
A cagey first-half saw the home side dominate, but struggle to find a way through a resilient rearguard effort from Jose Mourinho's men.
But the match changed completely in the second half, as Cristiano Ronaldo gave the visitors a shock lead in the 55th minute with a header from a corner.
Barca hit back instantly through Pedro, before a Lionel Messi penalty and a beautifully worked goal from Xavi put them in the driving seat.
However, a moment of madness from Victor Valdes gifted Angel Di Maria a goal with five minutes to go, leaving matters finely poised for the second leg in six days at Santiago Bernabeu.
Madrid started brightly, but were not able to sustain it for long as Barca began to assert their dominance in the middle of the park, with Andres Iniesta in particular looking lively.
Messi should have found the target in the 19th minute after latching on to Dani Alves' cutback just inside the box, but his effort flew the wrong side of the post.
The Argentine would miss an even better chance 10 minutes later, poking wide from a good position after dancing around two defenders in the area.
The match seemed to be settling into a war of attrition, though Pedro almost livened things up on the half hour mark with a swerving shot that forced Iker Casillas to save at full stretch.
Barcelona midfielder Sergio Busquets made a fatal error in the 55th minute, as he lost sight of Ronaldo defending a corner, allowing the Portuguese to nod the visitors into a surprise lead.
Madrid's joy lasted only seconds though, as straight from kick-off, Barca drew level.
Javier Mascherano's searching ball from his own half picked out Pedro on the left, who accelerated away from Fabio Coentrao to slot the hosts back on terms, despite calls from the visitors for offside.
The shackles were finally off, as Barca looked to press ahead.
Then, with 68 minutes gone, a clumsy tackle by Sergio Ramos brought down Iniesta in the area, giving referee Carlos Gomez no choice but to point to the spot.
Messi stepped up to send Casillas the wrong way and put Barcelona back in front.
Xavi appeared to put matters beyond any doubt 10 minutes later after slotting home from a superb setup from Iniesta, who ghosted past multiple challenges before putting the chance on a plate for his midfield colleague.
However, in the 85th minute, a howler from Valdes dragged Madrid back into the game and the tie.
The Barcelona keeper appeared to be under little pressure when collecting a back pass, but saw the ball stick under his feet, allowing Di Maria enough time to steal in and poke into the back of the net, giving the visitors a lifeline for the second leg.