Radhi Jaidi opened the scoring when he headed Gary McSheffrey's corner past keeper Conrad Logan from six yards.
Sebastian Larsson converted Andy Cole's cross to make it 2-0 after 19 minutes but substitute Geoff Horsfield's second-half arrival boosted the Foxes.
Striker Horsfield was fouled by Larsson and Shaun Newton scored from the resulting free-kick.
"But we had a little chat at half-time and sorted things out and marked a few cards and then in the second half we showed great energy and good quality and scored one goal and might have scored more.
"With that sort of performance we will ensure this club stays in the Championship.
"We've got to make sure we are up for a fight. Nigel Worthington's up for the fight and if the team is up for the fight we will be staying in this division."
"But fair play to Leicester, they made a real fight of it in the second half.
"You are supposed to enjoy moments like this, going for promotion. But I thought Saturday's last five minutes against Southampton were bad enough, and this was just as bad."
Leicester: Logan, Stearman, Johansson, Kisnorbo, Maybury (Horsfield 75), Newton, Jarrett (Hughes 61), Wesolowski, Mattock, Hume, Fryatt (Cadamarteri 65).
Subs Not Used: Henderson, Sheehan.
Goals: Newton 82.
Birmingham: Doyle, N'Gotty, Jaidi, Martin Taylor, Kelly, Larsson (Nafti 90), Muamba, Clemence, McSheffrey, Cole (Campbell 90), Bendtner (Jerome 84).
Subs Not Used: Maik Taylor, Vine.
Booked: Larsson, Nafti.
Goals: Jaidi 16, Larsson 19.
Att: 24,290
Ref: L Probert (Gloucestershire).