Birmingham made it five wins in succession as Derek McInnes began his reign at Bristol City with a defeat.
Curtis Davies headed an early chance over for the visitors while former England keeper David James made a double save to deny Blues' Chris Wood.
Chris Burke headed Blues ahead when he met Jean Beausejour's right-wing cross.
Albert Adomah almost levelled but Burke collected Keith Fahey's pass to add an injury-time second that left McInnes's side adrift at the foot of the table.
After 13 games, Bristol City only have six points but Birmingham can reflect on nine points from their last three Championship matches and the knowledge that if they win their games in hand they would only be a point behind leaders Southampton.
Despite having failed to win since 17 August, Bristol City had a couple of early chances with Marvin Elliott forcing Boaz Myhill to tip his volley on to the bar while Jon Stead sent a low cross past the post.
But Chris Hughton's Birmingham began to dominate and the opener came after 39 minutes when Marlon King and Beausejour linked up to give winger Burke an easy tap-in.
Jamal Campbell-Ryce almost levelled the game after a slip from Myhill but fired his shot into the side-netting.
Chris Hughton Birmingham boss
“We limited them to minimal chances but with the two wide players they have got they're always going to get crosses in and I thought we dealt with it very well.”
The hosts set about breaking down the Birmingham defence in the second-half but the visitors were happy to soak up the pressure.
Hughton replaced Wood and King with Nikola Zigic and David Murphy and Zigic almost doubled their lead.
But it was Burke who finished it off deep in added time with a cheeky finish through James's legs.
Bristol City manager Derek McInnes said: "We may need a couple of fresh faces to strengthen an imbalanced squad, but I believe I have inherited a good group of players with the right attitude.
"There wasn't much in the game. I felt we should have had a second-half penalty when Stephen Carr clattered into Jon Stead and we missed some decent chances."
Birmingham manager Chris Hughton said: "The first goal from Chris Burke was very good. He had the foresight to get into that position. To tap it in from the six-yard box shows great desire to get into the box.
"We had to defend very well today. We limited them to minimal chances but with the two wide players they have got they're always going to get crosses in and I thought we dealt with it very well."
Sorry, we were unable to load match stats, please try again.