Huesca took a shock lead after just two minutes, with Cucho Hernandez turning in from close range after Samuele Longo headed a cross into his path.
However, Messi levelled after 16 minutes after his brilliant turn left Luisinho on the turf, with the Argentine drilling home across goal.
The Catalans quickly went ahead after Jorge Pulido turned Jordi Alba’s cross past his own goalkeeper from close range.
Ousmane Dembele’s curling effort skipped off the crossbar as Barcelona turned up the heat, with Luis Suarez netting his first of the season after Alba teed him up for their third.
Shortly before half-time Alex Gallar pulled one back for Huesca, turning in from close range after Moi Gomez beat Samuel Umtiti to the ball to cut it back into his path.
Barcelona came out strongly at the start of the second half and Messi struck the crossbar before Dembele fired in the fourth after Suarez’s through-ball.
Ivan Rakitic’s searing half-volley earned Barcelona’s fifth, leaving goalkeeper Axel Werner with no chance, and Messi tucked home number six after an inch-perfect pass from Philippe Coutinho sent him racing in on goal.
Messi turned provider for Barcelona’s seventh, carefully playing in Alba who finished with aplomb, with Suarez winning and converting a penalty in stoppage time to complete the rout.
Earlier Alaves came from behind to beat Espanyol 2-1 and Valencia’s stuttering start continued as they were held to a draw by an impressive Levante side.
Marcelino’s Valencia, back in the Champions League, have not won any of their opening three matches, drawing with Atletico Madrid and losing to Espanyol last weekend.
Roger Marti sent Levante ahead in the 13th minute after a brilliant burst forward from Jose Morales opened up the pitch, but Denis Cheryshev headed Valencia level three minutes later.
Marti struck again across the goalkeeper for a fine second in the 33rd but Dani Parejo coolly levelled from the penalty spot early in the second half after Carlos Soler was fouled.
Coke was sent off with just under 15 minutes to go for Levante, picking up a second yellow card for a foul on Ferran Torres, but the visitors could not capitalize.
“I’m very happy, I feel good and have a lot of confidence,” Marti said. “We went out there to the death, we went in front twice and they came back.
“That’s the path. We reacted, overall a good performance. A point against Valencia is important, considering how the game went."
However, Messi levelled after 16 minutes after his brilliant turn left Luisinho on the turf, with the Argentine drilling home across goal.
The Catalans quickly went ahead after Jorge Pulido turned Jordi Alba’s cross past his own goalkeeper from close range.
Ousmane Dembele’s curling effort skipped off the crossbar as Barcelona turned up the heat, with Luis Suarez netting his first of the season after Alba teed him up for their third.
Shortly before half-time Alex Gallar pulled one back for Huesca, turning in from close range after Moi Gomez beat Samuel Umtiti to the ball to cut it back into his path.
Barcelona came out strongly at the start of the second half and Messi struck the crossbar before Dembele fired in the fourth after Suarez’s through-ball.
Ivan Rakitic’s searing half-volley earned Barcelona’s fifth, leaving goalkeeper Axel Werner with no chance, and Messi tucked home number six after an inch-perfect pass from Philippe Coutinho sent him racing in on goal.
Messi turned provider for Barcelona’s seventh, carefully playing in Alba who finished with aplomb, with Suarez winning and converting a penalty in stoppage time to complete the rout.
Earlier Alaves came from behind to beat Espanyol 2-1 and Valencia’s stuttering start continued as they were held to a draw by an impressive Levante side.
Marcelino’s Valencia, back in the Champions League, have not won any of their opening three matches, drawing with Atletico Madrid and losing to Espanyol last weekend.
Roger Marti sent Levante ahead in the 13th minute after a brilliant burst forward from Jose Morales opened up the pitch, but Denis Cheryshev headed Valencia level three minutes later.
Marti struck again across the goalkeeper for a fine second in the 33rd but Dani Parejo coolly levelled from the penalty spot early in the second half after Carlos Soler was fouled.
Coke was sent off with just under 15 minutes to go for Levante, picking up a second yellow card for a foul on Ferran Torres, but the visitors could not capitalize.
“I’m very happy, I feel good and have a lot of confidence,” Marti said. “We went out there to the death, we went in front twice and they came back.
“That’s the path. We reacted, overall a good performance. A point against Valencia is important, considering how the game went."