The Spanish and European champions went two goals down inside seven minutes thanks to Lionel Messi and Ivan Rakitic, before Mateo Kovacic and Marco Asensio forced parity heading into half-time.
Gerard Pique grabbed Barca's clincher five minutes after the restart, however, leaving Real winless after three International Champions Cup games.

Neymar (L) of Barcelona greets teammate Gerard Pique (C) in celebration following Pique's his game-winning goal against Real Madrid during their International Champions Cup football match at Hard Rock Stadium on July 29, 2017 in Miami, Florida.

Image credit: Getty Images

Asensio, Benzema star as Real Madrid rout Mallorca
Zidane, whose team face the Catalans again in the Supercopa de Espana in two weeks' time, can now turn his thoughts to the UEFA Super Cup meeting with Manchester United in Skopje.
"This is pre-season and I'm sure that the results we've achieved weren't what we were expecting, but this doesn't alter anything," the Frenchman told
"The important thing is to be ready for August 8. I saw some good things out there, but also some things I didn't like.

Gerard Pique #3 of Barcelona celebrates after scoring a goal in the second half against Real Madrid during their International Champions Cup 2017 match at Hard Rock Stadium on July 29, 2017 in Miami Gardens, Florida.

Image credit: Getty Images

"We've got to be patient, work hard and be ready for the UEFA Super Cup.
"I'm not bothered by the defeat. It always hurts, we don't like to lose but that's not the most important thing. We need to improve and change a few things."
Barca head coach Ernesto Valverde, who succeeded Luis Enrique this summer, is keen to keep hold of the in-demand Neymar.
The Brazilian striker has been linked with a potential €222 million switch to Paris Saint-Germain, a deal which would see him become the most expensive player in the world.
Valverde expects the 25-year-old to stick around and contribute at the Nou Camp, however.
Quoted in Marca, he said: "I try to talk about what is happening right now. Neymar is here with us, we count on him and we think that he should help us out this year."

Neymar of FC Barcelona during the International Champions Cup 2017 match between Real Madrid and FC Barcelona at Hard Rock Stadium on July 29, 2017 in Miami Gardens, Florida.

Image credit: Getty Images

He felt the friendly triumph acted as a warm-up for the two-legged Supercopa showdown, which starts on August 13.
After full-time at the Hard Rock Stadium, the former Athletic Bilbao manager told "Those matches will be different - there is no such thing as a friendly against Real.
"My team started the game very well and I was happy with how they dominated proceedings.
"We had many chances to extend the scoreline further.
"It was an opportunity to see how great these players are, especially Messi who was extraordinary."
James Rodriguez completes Qatar move to end time at Everton
Koeman walks out of press conference after reading statement requesting patience