Sergio Aguero struck in stoppage time to secure a 2-1 advantage for the Premier League leaders after the underdogs threatened an upset at the Etihad Stadium.
The Championship side went ahead on the stroke of half-time though Bobby Reid's penalty before Kevin De Bruyne capped off a fine move to equalise 10 minutes after the interval.
It looked like the tie would be heading to Bristol all-square but Aguero came off the bench to nod in a stoppage-time winner.
City still have it all to do, but Guardiola says they will not be heading to Ashton Gate just defend their lead.
"They are a fantastic team," Guardiola revealed after the game. "That's why they knocked out four Premier League teams. Without that they will not be in the semi-final.
"They can play, long balls, they are fast, they know exactly what they have to do. Of course we will attack in Bristol and we're going to try and win."