It will be a tall order for Boro to catch sixth-placed Reading - eight points away following their defeat at Bournemouth - but the Teessiders are hitting form at the right time.
Their third straight league victory was ultimately decided by Jacob Butterfield's long-range screamer following a regulation finish from Danny Graham.
Birmingham's young star Emyr Huws - on loan from Manchester City - scored the goal of the evening, however, his sublime rocket from distance setting up a nervous second-half battle.
The tension boiled over in the last 10 minutes and Kenneth Omeruo and Ben Gibson were both sent off, but Boro made sure of the points with substitute Lee Tomlin's first goal for the club.
Lee Clark's Blues, meanwhile, are only four points clear of the relegation zone following the loss.
There were plenty of hints dropped that something special would happen in the first half.
Early on, Darren Randolph tipped Nathaniel Chalobah's lofted effort over the bar.
The on-loan Chelsea midfielder soon tricked Huws into conceding a free-kick, from which he headed narrowly wide.
The moment that immediately preceded the goal rush evoked gasps from around the Riverside as Omeruo got his head to the ball to clear Chris Burke's goalbound shot.
In the 29th minute Graham broke the deadlock with the most conservative goal of a breathtaking six-minute spell.
Jonathan Woodgate - on as an early sub for the injured George Friend - headed a corner ball into the six-yard box where Boro academy product Graham controlled and finished with ease.
Only 85 seconds later, Butterfield controlled Jozsef Varga's throw-in to scream the ball past Randolph from fully 20 yards.
The Boro faithful made sure to convey their gratitude to the former Norwich man, and then stayed on their feet to applaud the goal that most definitely upstaged his effort.
As Birmingham probed for a rare opening in the Boro backline, Huws simply looked up and arched a dipping thunderbolt under the bar from 35 yards.
Andrew Shinnie could even have equalised before the break, but his header from Conor Reilly's cross bobbled across goal and wide.
The stricken Lee Novak was carried off on a stretcher and replaced by Nikola Zigic in first-half stoppage time to sympathetic applause.
Seven minutes into the second half Graham should have made it 3-1 when clipping a shot off the vulnerable Randolph and onto the bar.
Just past the hour mark the menacing Sunderland loanee burst through the Blues defence to test Randolph with a low shot, with Paul Robinson impressively clearing the rebounding ball.
The draw remained one accurate kick away, though, and sub Jordon Ibe came close to levelling with a low drive to the far post after cutting inside.
Emmanuel Ledesma has won games for Boro with his individual skill and invention and nearly rubber-stamped the result from the bench with a searing strike down Randolph's throat.
Omeruo walked after grappling with Ibe - his second bookable offence on the night - and Gibson followed him down the tunnel on the same basis after fouling Zigic moments later.
Birmingham attacked their depleted hosts with fervour, but it was Tomlin who had the last laugh.
He gambled with a bouncing ball over the top before smashing past Randolph to end the contest.