Dexter Blackstock was at the double for Steve Cotterill's side as they made it two victories on the bounce to stay three points above the relegation zone and cause a few worried glances from those teams above them.
The result ends a long unbeaten run for Birmingham and Cotterill was delighted with the strength shown by his men to go on and win the game after Chris Burke had levelled.
He told the official club website: "It was easy at 1-1 to see the game going one way, but after their goal we got a grip on the game again."