Messi's goal came at the end of a length-of-the field counterattack, which started after a City free kick was cleared.
"Obviously it was a big game for us, we knew we were under pressure", man of the match De Bruyne told BT Sport after the match.
"If you turned off the TV after those 40 minutes, you'd have believed that we would beaten them heavily".
Barcelona's winning run in the Champions League was ended by Manchester City on Wednesday.
Buoyed by a promising opening 15 minutes at the Nou Camp a fortnight ago, Guardiola's side again began at breakneck speed.
Left-back Lucas Digne somehow escaped an early booking for a cynical foul on Sterling as he looked to break.
What a difference two weeks make. The Messi goal was a classic example of how lethal they can be on the counter-attack - something which has developed during the Luis Enrique era - and they could have scored more.
And, while Guardiola conceded his players had endured a hard start, he praised the attitude of his players after pulling level.
In a case of roles reversed, it was a mistake in the Barcelona defense which gifted City a route back into the game.
Guardiola was delighted with what his team had produced from the moment they equalised six minutes before half-time, but insisted he took no additional pleasure from the fact the win had come against his old club.
Just five minutes into the second half, City took the lead. Got a hand to the De Bruyne free kick, but wasn't directly at fault for any of the goals.
GETTY Jose Mourinho wants Luis Suarez
With the players on a high and the Etihad booming, City started to turn the screw. Gave away free kick after free kick, including the one which De Bruyne scored from.
The ESPN FC crew break down Man City's win over Barcelona, saying Luis Enrique's men had no control over the midfield.
Most sides defeat the Catalans with attritional football. After a brilliant De Bruyne through ball to Jesus Navas, who crossed into the box.
"They had an wonderful 30 minutes, we had a lot of problems but our first goal helped us a lot", Guardiola said after the match. "The result was more than deserved".
As the nights draw in and a winter chill arrives, you could be forgiven for thinking Arsenal seemingly suffer from seasonal affective disorder. Neymar had a shot from a tight angle tipped away by Willy Caballero and another effort blocked, while Gomes was also thwarted and Luis Suarez spurned two chances.
Although they had to wait until two minutes from time before finally taking the lead. He collected a through ball, lifted it over goalkeeper Milan Borjan, and then glided past two defenders before calmly slotting into an empty net.
City started with Sergio Aguero in attack, following his surprise omission at the Nou Camp, and looked all the more unsafe for it.
Bayern and Atletico Madrid both advanced from Group D, Arsenal and Paris Saint-Germain booked their tickets from Group A to the round of 16.
A Robert Lewandowski-inspired Bayern Munich also came from behind to narrowly beat a resilient PSV side.
Messi celebrates after giving Barcelona the lead.
Atletico still have maximum points after Antoine Griezmann's stoppage-time goal secured a 2-1 victory over Rostov at the Vicente Calderon.