Fahey and Jerome had hauled the visitors level in thrilling second half
Robert Huth opened the scoring for the home side after instinctively twisting and thumping a loose ball beyond Ben Foster, and Ricardo Fuller looked to have sealed victory for the beleagured home side with a wonderful solo goal.
Substitute Keith Fahey and striker Cameron Jerome brought Birmingham back from the dead within minutes, but with just over five to play the Potters banished their dismal run of four consecutive defeats to the history books as Dean Whitehead popped up to turn in a Matthew Etherington cross.
A significant change in personnel was required for the home side, with suspension ruling out club captain Ryan Shawcross, whose absence at the back was less keenly felt as versatile veteran Danny Higginbotham slotted in, while another steady figure – Rory Delap – replaced youngster Marc Wilson in the middle of the park, with Tony Pulis throwing in the enigmatic Fuller alongside Kenwyne Jones up top.
Alex McLeish had no cause to make enforced changes, but did see fit to reward two of the substitutes who played a pivotal role in Saturday's comeback against West Ham United with starts as Jean Beausejour and Craig Gardner respectively replaced Keith Fahey and Alexander Hleb.
And it was the visitors who had the brightest opening, but it was through the absent-mindedness of Senegalese centre-back Abdoulaye Faye that Blues were given a first glimpse of attack as the big defender trod on the ball and allowed Nikola Zigic to feed in strike partner Jerome, only for the burly forward to run the ball out of play.
After another moment of sloppiness, this time as Delap carelessly allowed Barry Ferguson to breeze by, the Potters finally plucked up the courage to get forward, and twice in two minutes Jones came close to opening the scoring.
First the totemic Trinidad and Tobago star leapt up to glance home a Matthew Etherington cross, only to miss the ball by inches, before the former Sunderland man hit the ball but not the target as he wrenched his neck to slam down a Jermaine Pennant cross just the wrong side of Foster's goal.
Stoke nearly opened the scoring moments after as Birmingham failed to clear their lines from a barrage of set-plays and crosses, which culminated in a clash between Higginbotham and Foster, and then Fuller skewed the resultant loose ball wide on his weaker left foot with Stephen Carr ensuring that it was turned round the post.
It was all red and white in the opening 20 minutes as Stoke poured men forward, with wingers Pennant and Etherington both causing issues down the flanks, but Delap's famous throws were largely well dealt with by the dogged duo of Scott Dann and Roger Johnson.
But for all their good work, the Potters seemed equally as likely to gift their opponents a goal as they did to score one of their own. More slack midfield play allowed Gardner to nudge the ball into Stoke's half unopposed and then to weave between several defenders before hitting an ultimately tame shot towards Asmir Begovic.
Foster, meanwhile, nearly had a horror moment when a Delap throw arrowed in on goal and the England man, who earned rave reviews after keeping his side in it against West Ham, palmed a ball that was headed straight to the back of the net untouched, back across the six-yard box. Fortunately for the former Potters stopper, a blue shirt was on hand to hack the ball away.
Gardner's run and strike aside, Begovic had nothing to do in the first half hour except watch a Jerome blast fly wide of his covered near post, but the away side were beginning to frustrate as they started to pass the ball across the width of the pitch, a sequence of play that was ended as Whitehead clattered into the back of Zigic in an aerial duel, the impact of which saw the Serb needing treatment on the sideline.
That niggly moment summed up the remaining minutes of the first half, but on 44 minutes the Potters finally breached Birmingham's backline as Huth reacted quickest to a blocked Fuller strike to lash it beyond Foster and into the back of the net.
And the German should have had at least one more strike to his name before referee Mark Clattenburg blew time on the first half as the ex-Chelsea man first hit a sweet volley that drew a fabulous save from Foster before then hitting a thumping header straight into Fuller on the line.
But Pulis will have been buoyed by his side's performance as the teams headed to the tunnel; the first time this season that Stoke have gone into the break with a lead.
Neither manager saw fit to make a change prior to the restart, from which the Potters would again come close to extending their lead as Fuller burst into the box only to be denied a clear shot on goal by an excellent Ferguson recovery tackle, while Huth had a chance to notch up a second but could only fire his header from an Etherington cross wide.
Jerome fluffed an excellent opportunity to tie the game against the run of play as he dallied under pressure from Higginbotham before hitting a limp strike towards Begovic.
With just over half an hour remaining, and with his side making few inroads, McLeish replaced the disappointing Beausejour for Fahey, and the midfielder made an instant impact, seeing an effort from distance deflect wide for a corner.
From Larsson's delivery Roger Johnson drew a terrific reaction save from Bosnian blocker Begovic, who tipped the goal-bound header over the bar.
And the former Pompey man was on hand once more to collect a stinging Gardner free-kick that a less assured keeper could easily have spilled, while his kicking allowed Fuller to race clear and latch onto a looping ball that had Foster fooled, only for the Jamaican's effort to sail wide from an acute angle.
Now it was Birmingham's turn to create trouble, and McLeish's side first saw Jerome scuff a shot with the goal at his mercy, then Zigic had a close range strike blocked by Begovic, before Gardner and Stephen Carr had strikes cleared off the line.
But Stoke were swiftly on the front as Fuller pounced on a loose ball, turned inside Dann and then cut onto his left foot and smashed the ball from the edge of the area into the far corner.
Almost as quickly as Stoke had made it two from the counter, Birmingham pulled one back from the restart as substitute Fahey fired in from 18 yards, leaving Begovic with little chance.
And the visitors completed a second two-goal comeback in four days as Jerome nodded home from a perfectly weighted Larsson cross.
Gardner then came close to capping off the unlikeliest of reversals when he saw an strike from all of 30 yards dip and swerve before being tipped over from Begovic.
But a fifth goal in a thrilling encounter was soon forthcoming, and from an unlikely source as Whitehead sneaked in unmarked to pounce on an Etherington swipe across the face of goal to prod it beyond Foster with just over five minutes left on the clock.