A poacher's goal from Mikael Forssell and two stunning saves by Maik Taylor saw edgy Birmingham through to the last eight at the expense of gutsy Stoke.
Forsell struck just after half-time, but the home side controlled possession and Taylor had to produce a man of the match display to hold them at bay.
The return of Nicky Butt was one of three changes made by Steve Bruce to the side comprehensively beaten at West Ham on Monday.
And the early signs were good for the Premiership strugglers as Emile Heskey's shot from Forsell's lay-off forced a decent save from Steve Simonsen.
Jermaine Pennant also fired over from Heskey's pass before Stoke began to get a toe-hold in the contest, driven on by the efforts of Luke Chadwick and Dave Brammer in midfield.
Brammer gave the home fans a lift in the 21st minute when his fiercely-struck 25-yard volley stung Taylor's fingertips.
And Taylor had to be at his best three minutes from the interval when he produced a brilliant fingertip save to keep out a drive from Carl Hoefkens.
But Birmingham grabbed the all important goal two minutes into the second half with manager Bruce still walking back to his seat in the dugout.
Pennant's left wing corner was flicked on by the head of Martin Latka and Forssell, lurking at the far post, fired in from two yards.
Stoke refused to lie down, however, and the Blues were indebted to another superb save from Taylor, who clawed away Michael Duberry's goal-bound header from Brammer's corner.
And the Championship outfit missed the chance of the day in the 58th minute when Sambegou Bangoura, with the goal at his mercy six yards out, headed Mamady Sidibe's cross straight into Taylor's grateful arms.
Stoke, whose last goal was scored in the fourth round by Chadwick 401 minutes ago, forced the pace for most of what remained but Birmingham stood firm.