© Getty Images
Two goals from Robert Dale had given the Evostik Northern Premier side a 2-0 half-time advantage but three goals at the start of the second half ensured that the Championship club prevailed in the North-East.
Birmingham began the match on the front foot with Nikola Zigic blazing over the crossbar from close range, but Blyth Spartans signalled their intent to play a high-tempo game when Dean Maguire almost netted after charging down a clearance.
The visitors were still having the better of the play, but after Wes Thomas had missed the target the minnows edged in front through
Dale, who got on the end of a Jarrett Rivers pass to convert past Colin Doyle.
Four minutes before half time, Dale netted his second after ghosting into the penalty area to drive the ball past Doyle to leave Blyth 45 minutes from a victory that would be regarded as one of the competition's greatest shocks.
However, after what can only be expected to be a stern telling off from manager Gary Rowett, the Blues returned for the second half a different side and they needed just four minutes to halve the deficit through Lee Novak, who cut inside onto his right foot before powering the ball into the corner.
The goal rocked the home side, and three minutes later, Birmingham were back on level terms when Thomas lashed the ball into the net after he had been given the space to drive into the area.
It was one-way traffic and just 13 minutes after the restart, the turnaround was complete when Thomas was perfectly placed at the back post to head home a cross from Mark Duffy.
Blyth were in a state of disbelief, but after regaining their composure, Dale almost netted his third of the afternoon when shooting marginally wide of Doyle's post.
As the game neared a conclusion, it was Birmingham who looked more likely to find a sixth goal of the contest as Novak came close on two occasions.
However, deep into added-on time, Blyth should have scored a dramatic equaliser when Maguire burst clear of the Birmingham defence but after sending his shot over the bar, the West Midlands side survived to book their place in the fourth round.