It was an eventful first period from both sides, with Messi giving them he lead in the 17th minute. Good opportunities from Ivan Rakitic, Nolito, Ilkay Gundagon and Luis Suarez but one goal it remained.
It was a nightmare start to the second period for Guardiola's side, with the dismissal of Claudio Bravo, and Messi's second on the hour mark.
The dismissal of Jeremy Mathieu and Neymar's penalty miss took the shine off Messi's hat-trick, but Neymar's late effort made sure Guardiola left Catalonia with a red face.
Great way to start
On paper it looked a great match at the Nou Camp, with former manager Guardiola returning with his new English side.
However it was a bittersweet start for the home side, losing Jordi Alba early on through injury, but managed to draw first blood in the 17th minute.
The blame could be placed on Fernandinho, Messi started the move laying it off before Andres Iniesta attempted to hook it back to the Argentine. It looked easy for Fernandinho, but the Brazilian's slip allowed Messi to run through, round Bravo and finish with ease.
So close yet so far
Barca nearly made it two after the half hour mark with Rakitic's header, but City dominated the late proceedings, and had great opportunities to equalise.
David Silva was pulling the string in the midfield, and he managed to put Nolito through down the wing, but his tame effort was easy for Marc-Andre ter Stegen.
The German was hand again almost instantly, as Gundagon skipped past the injured Gerard Pique, but ter Stegen did brilliantly with his reaction save to deny his compatriot.
Suarez should have made it two in first-half stoppage time, he did well to draw Bravo out who managed to get the touch, but the Chilean was forced to tip it over his crossbar to avoid a howler on his former ground.
From bad to worse
Things looked bright at the start of the second period for City, with Kevin De Bruyne coming close, but it fell apart when they were reduced to ten men.
It was a moment of madness from Bravo with his attempted kick falling straight to Suarez. The Uruguayan looked to chip his former teammate, with Bravo deciding to handball outside the area, giving the referee no option.
It got worse for City, as Barca and Messi doubled their tally for the night. It proved to easy for the star man, cutting inside John Stones before clattering it at the near post.
The tie was sealed with little over twenty minutes to play, with Messi scoring his second consecutive Champions League hat-trick.
Again it was poor play from City, with Gundagon's pass not been seen by Stones and on a plate for Suarez, who simply squared it across for Messi to coolly slot home.
Opportunity for a comeback
Despite them three goals behind, City were still pushing. They had a great chance when De Bruyne's free-kick was parried by ter Stegen into the path of Stones but he fluffed his lines.
The sides were brought level in terms of players on the pitch, as Barca were reduced to ten as well.
It was poor from Mathieu, as he picked up two yellow cards in quick succession, with the foul on Raheem Sterling sending him for an early shower.
Villain to hero
It looked to be four for Barca, as Messi drove through the City defence and was brought down by Aleksandar Kolarov, with the referee pointing to the spot.
Neymar stepped up for spot kick but his dramatic run up didn't fill many with confidence, and it was justified when Willy Caballero did well to save it.
The Brazilian redeemed himself almost instantly, as he scored the fourth and final goal of the night.
He picked the ball up from Messi outside the area, and managed to dance his way into the area, walking off Stones' challenge before slotting home.
Barcelona sit top of the group with nine points, five points ahead of City, who sit second.