The Black Cats were the better side for long periods, but goals from Sebastian Larsson and Craig Gardner mean Steve Bruce's side are still very much embroiled in the battle to avoid the drop to the Championship.
Indeed, Wigan's emphatic win at Blackpool means Sunderland are now just five points clear of the bottom three.
Simon Mignolet was at fault for both Birmingham goals, with a breakdown in communication with Phil Bardsley enabling Larsson to score and Gardner's shot finding the corner of the net despite the Belgian getting a hand to it.
Sunderland started slowly, and Birmingham could have been ahead as early as the second minute. Cameron Jerome outpaced Michael Turner, but Mignolet saved the striker's shot with his legs.
However, the visitors gradually settled and, for much of the first half, Steve Bruce's side were on top.
They didn't create a great deal, but were presented a golden opportunity to break the deadlock in the 15th minute.
Lee Cattermole dispossessed Barry Ferguson on the edge of the area, but the midfielder's shot was saved by Ben Foster. Jordan Henderson then recycled the loose ball to Stephane Sessegnon, but while the Benin international's 14-yard strike was on target, Roger Johnson completed a routine clearance from the line.
The home crowd at St Andrew's were growing increasingly uneasy, but the mood was transformed when Sunderland shot themselves in the foot in spectacular fashion four minutes before the break.
Jerome flicked on Foster's long punt, but Bardsley and Mignolet were both well positioned to clear the damage.
Mignolet called for the ball, Bardsley appeared to pull out to enable him to clear, and Blues midfielder Larsson nipped between the duo to lob the ball into an empty net, although there is a suggestion that the final touch might have come off Bardsley.
The Black Cats have conceded a number of soft goals recently, but this was surely the poorest of the lot.
Asamoah Gyan wasted a decent opportunity to level before the break Foster palmed his curled effort around the upright and Henderson curled narrowly wide five minutes after the interval following a fine passing move that also involved Danny Welbeck and Gyan.
Foster has been in impressive form all season, and the England international produced an excellent save shortly before the hour mark to tip Welbeck's eight-yard header over the top.
Mignolet, on the other hand, was shaky all afternoon, and questions could be asked of the Belgian again as Birmingham doubled their lead in the 66th minute.
Gardner cut across the face of the penalty area and drilled in a 25-yard shot. Mignolet got his hand to it, but only succeeded in helping the ball into the corner of the net.
BIRMINGHAM (4-4-2): Foster; Parnaby, Johnson, Ridgewell, Carr; Larsson (Fahey 88), Ferguson, Bowyer, Gardner; Phillips (Hleb 63), Jerome (Derbyshire 90).
Subs (not used): Doyle (gk), Davies, Mutch, Bentley.
SUNDERLAND (4-4-2): Mignolet; Elmohamady, Onuoha, Turner, Bardsley; Henderson, Colback (Malbranque 76):, Cattermole, Sessegnon; Welbeck (Noble 71), Gyan.
Subs (not used): Gordon (gk), Meyler, Zenden, Riveros, Lynch.