Goals from Lionel Messi and Antoine Griezmann turned the game on its head, only for Atletico to hit back with a late double, Alvaro Morata converting a penalty in the 81st minute before Angel Correa found a winner in the 86th.
In between, Barcelona also had two goals ruled out after VAR spotted tight offsides while Atleti were denied what looked a clear penalty at 2-2, after the ball clipped the hand of Gerard Pique.
“They had more legs than us and in the end it cost us,” said Griezmann.
“We made mistakes in everything, in passes – I think I missed a pass to Sam (Umtiti) before they scored – and the little things can lose you a match, a league, a Champions League.”
A pulsating contest will have delighted the Spanish Football Federation, who have faced heavy criticism for taking the competition away from Spain to a different continent, and a country that has a long-condemned record on human rights.
Barcelona coach Ernesto Valverde said on Wednesday he preferred the old format but his strong team selection, that included Messi, Griezmann and Luis Suarez, suggested this was a tournament he was eager to win.
“The goal for 2-2 came at a time when we didn’t know how to get a hold of the game,” said Valverde, whose position will come under renewed scrutiny.
“There is always instability when you lose,” he added.
It remains to be seen how this defeat might affect the La Liga title race, with Real Madrid and Atletico now enjoying the opportunity not only to claim a trophy but score a psychological boost too.
“It is important for the club, we beat the best attacking team in the world,” Atletico coach Diego Simeone said. “You saw our bite, our belief, our desire. It’s what this club is all about.”
Barca dominated the first half and Griezmann had the best chance, only for his lifted finish from the angle to be saved by the excellent Jan Oblak.
Atletico survived and frustration spilled over at the break as Jordi Alba poked a finger in the face of Joao Felix, who then went head-to-head with Messi. Suarez also had to be pulled away by Stefan Savic.
A spikey end to the first period was trumped by an explosive start to the second as Koke, on for less than a minute, gave Atletico the lead. Felix started the move and Correa slipped in Koke to stab into the bottom corner.
Simeone chose not to celebrate and if he was worried about the amount of time left, he was right, as Barcelona scored twice in 11 minutes.
First, Messi equalised after muscling his way through Koke and Savic on the edge of the area and then he fired in again after steering a high ball around Koke. This time, however, VAR showed his elbow had served as a cushion.
Disappointment was brief though as Alba crossed for Suarez and while his header was brilliant pawed away by Oblak, Griezmann nodded in the rebound.
Pique thought he had a third after Arturo Vidal half-volleyed Messi’s free-kick across the box but again VAR intervened.
Atletico came again. Correa should have pulled them level but appeared keener to find Felix than shoot himself and when the rebound did fall to the Felix, Sergi Roberto made a last-ditch block.
But the floodgates had opened in the Barca defence. Vitolo was next to go clear and this time he was brought down by Neto. Morata converted the penalty.
Then, Morata skipped free down the right and his cross struck the dangling hand of Pique but after consulting VAR, the referee decided against another penalty.
Yet moments later, Atletico were in again. Correa this time sprinted in behind and while Neto made a block, the ball had just enough power to cross the line. Now, Simeone could celebrate.