Substitute Tommy Smith was Sunderland's goalscoring hero with two vital extra-time goals that swept the Black Cats into the quarter-finals of the FA Cup and a home tie against Sheffield United.
On Sunderland's previous visit to St Andrew's their relegation from the Premiership was confirmed.
On this occasion they enjoyed better fortunes to deservedly progress into the last eight.
It was a worthy success as Birmingham surprisingly struggled against the north-east club for long spells of the game before Smith's vital extra-time goals.
Sunderland were the more positive and they were well-served in defence by Irishman Gary Breen and the talented Julio Arca.
Although Robbie Savage was an early driving force for Birmingham, the Blues, already without their French international striker, Christophe Dugarry, lost the services of David Dunn after only six minutes.
Following a promising start Dunn, who has only recently returned to the side, pulled up in agony while running onto the ball. He slumped to the ground holding the back of his left leg and had to be stretchered off the pitch.
Sunderland, beaten 4-0 at Cardiff on Saturday, competed well and it was only some casual finishing by Marcus Stewart which prevented the Black Cats taking an early lead.
As in the first game Kevin Kyle proved to be a dangerous opponent for Kenny Cunningham. The gangling Sunderland striker was a big problem and did much to keep his side in the game as Birmingham experienced a great deal of difficulty gaining the upperhand.
Birmingham's best chance of going ahead in the first period occurred just before the break. A Mikael Forssell pass found Clinton Morrison but Mart Poom made a fine save as he advanced from his line.
Stewart, later replaced by Smith, wasted a great opportunity to put Sunderland ahead early in the second period.
On this occasion the striker just missed a right-wing cross from John Oster with a diving header.
It did, however, spark off a spell of intensified attacking play from the Black Cats when Birmingham were reduced to panic stations to keep out the first division side.
Birmingham's desperation became evident when manager Steve Bruce sent on striker Stern John in place of Olivier Tebily in an attempt to inject more attacking pressure.
But it was still Sunderland who were the more dangerous and only a poor pass from Oster towards Kyle prevented Sunderland going ahead.
In the 82nd minute Birmingham were indebted to their Irish international goalkeeper Maik Taylor for keeping them in the game.
A free-kick from Oster was deflected but Taylor, showing great reflex action, twisted backwards to save at the near post.
Cunningham and Darren Purse kept Birmingham in the game. They both defended doggedly as the Premiership side were increasingly embarrassed by Sunderland's second-half domination.
Sunderland's opening goal finally arrived in the tenth minute of extra-time. A ball into the middle was collected by Kyle who was suspiciously offside.
He turned and smashed his shot against the bar and from the rebound Smith blasted the ball home to the delight of the travelling Sunderland fans.
Smith put Birmingham out of their misery with his second goal in the 115th minute when he latched on to a long, high ball to score with a cross-shot past Taylor.