Rob Edwards's own goal and strikes from Keith Fahey and Nathan Redmond steered Chris Hughton's Birmingham to third as they overcame a battling Barnsley.
Edwards turned Chris Burke's strike into his own goal to put the visitors ahead early on.
Barnsley drew level when Craig Davies drilled in, but Fahey put Birmingham back in front when he turned his man before scoring from 20 yards.
Redmond then sealed the win for the visitors with a second-half strike.
After Europa League duties earlier in the season, this was the Blues' 44th game of the campaign, but they showed no signs of fatigue as Marlon King was alert early on to pick up on an error by Jim McNulty and set up Burke, whose strike flew in off the head of the unfortunate Edwards.
But the Tykes responded well with debutant David Cotterill picking himself up from a challenge in the area to cut back for Davies to fire home his 10th of the season.
Blues midfielder Burke was causing a host of problems for the home defence, but it was the impressive Fahey who put Hughton's side back in front with a powerful left-foot strike just before the half-hour to grab his first goal since August.
Barnsley pushed for a second equaliser with Davies coming closest when he rattled the bar.
However, Fahey and Burke combined with 12 minutes to go when they set up Redmond, who finished emphatically with his left foot to give Birmingham breathing space.
It was all the margin they needed, as they followed their impressive draw at Chelsea in the FA Cup at the weekend with a win that ensures West Ham and Southampton can take nothing for granted in the Championship's automatic promotion spots.
Barnsley manager Keith Hill:
"I am disappointed with the first goal, it was avoidable again and an individual error. The second goal was a very good goal; you cannot complain about that.
"They [Birmingham] have got a great chance [of promotion]. It is getting down to the nitty-gritty now with respect to the top three or four.
"They have got that know-how when it comes to the last five or six games of the season. They have all been there before so you can't argue that they are in there with a real good chance."
Birmingham City manager Chris Hughton:
"I think we always have to kick ourselves and remind ourselves there is still a third of the season to go. I am quite sure in that 15 games there are going to be lots of twists and turns.
"We [have] good momentum but it's not only us. Blackpool lost tonight but there is a good group of teams who are all showing good momentum. The important thing for us is that we can't take our foot off the pedal.
"We have also got two teams above us who at this moment don't look like losing a game. I certainly think that any team that finishes above West Ham and Southampton will go up automatically."