Rolando Bianchi scored a superb winner to book Manchester City's place in the third round of the Carling Cup.
Mpenza opened the scoring with his first goal of the season
The visitors, who made eight changes from Saturday's defeat at Arsenal, were well on top in the early stages.
Emile Mpenza put the Blues ahead with a powerful finish and Bianchi saw another goalbound effort deflected over.
Bristol City were much improved after the break and Bradley Orr levelled from close range before Bianchi drilled home from the edge of the box to settle it.
Bristol City: Weale, Orr (Jevons 86), Carey, Fontaine, McAllister, McIndoe, Johnson, Elliott, Brian Wilson (Sproule 52), Murray, Trundle.
Subs Not Used: Basso, Skuse, Vasko.
Goals: Orr 69.
Man City: Hart, Jihai, Corluka, Onuoha, Ball, Logan, Ireland, Gelson, Geovanni (Dabo 82), Mpenza, Bianchi (Dickov 89).
Subs Not Used: Schmeichel, Mills, Laird.
Goals: Mpenza 17, Bianchi 81.
Ref: Richard Beeby (Northamptonshire).