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.
Did you know?
Birmingham are now unbeaten in 15 games in all competitions with their last defeat coming against Crystal Palace on 19 December
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."
Full Time The referee blows his whistle to end the game.
Free kick awarded for a foul by Nathan Redmond on Scott Wiseman. Free kick taken by Luke Steele.
Nathan Redmond takes the direct free kick.
Substitution (Birmingham) makes a substitution, with Pablo Ibanez coming on for Jonathan Spector.
Jim O'Brien challenges David Murphy unfairly and gives away a free kick.
Corner taken right-footed by Jim O'Brien from the left by-line to the near post, Jordon Mutch makes a clearance.
Wade Elliott gives away a free kick for an unfair challenge on Michael Tonge. Scott Wiseman crosses the ball from the free kick right-footed from right channel, Curtis Davies manages to make a clearance.
Shot by Jim O'Brien from outside the area goes high over the crossbar.
David Murphy crosses the ball from the free kick left-footed from right channel, comfortable save by Luke Steele.
Booking Booking for Jimmy McNulty for unsporting behaviour.
Unfair challenge on Adam Rooney by Jimmy McNulty results in a free kick.
Effort on goal by Nathan Redmond from just inside the penalty box goes harmlessly over the target.
The assist for the goal came from Chris Burke.
77:37 Goal scored
Goal - Nathan Redmond - Barnsley 1 - 3 Birmingham Nathan Redmond grabs a goal from deep inside the penalty box to the top right corner of the goal. Barnsley 1-3 Birmingham.
Rob Edwards restarts play with the free kick.
Substitution Nathan Redmond comes on in place of Morgaro Gomis.
Substitution Korey Smith goes off and Michael Tonge comes on.
Substitution (Barnsley) makes a substitution, with Scott Golbourne coming on for Jay McEveley.
Substitution Adam Rooney comes on in place of Marlon King.
Booking Jordon Mutch goes into the book for unsporting behaviour.
Free kick awarded for a foul by Jordon Mutch on Paul Digby.
The offside flag is raised against Craig Davies. Indirect free kick taken by Jonathan Spector.
Booking Booking for Jonathan Spector for time wasting.
Chris Burke takes a shot. Luke Steele makes a save.
Corner taken by Jim O'Brien, Effort on goal by Rob Edwards from inside the area goes harmlessly over the bar.
Jim O'Brien takes a outswinging corner from the right by-line played to the near post, clearance made by Jordon Mutch.
Jim O'Brien takes the outswinging corner, clearance by David Murphy.
Free kick awarded for an unfair challenge on Craig Davies by Jordon Mutch. Shot on goal comes in from Craig Davies from the free kick, Wade Elliott gets a block in.
Free kick awarded for an unfair challenge on Paul Digby by Jordon Mutch. Direct free kick taken by Korey Smith.
Substitution David Cotterill leaves the field to be replaced by Jim O'Brien.
Free kick awarded for an unfair challenge on Marlon King by Jimmy McNulty. David Murphy crosses the ball in from the free kick.
Jimmy McNulty has an effort at goal from outside the box which goes wide left of the target.
The offside flag is raised against Marlon King. Free kick taken by Rob Edwards.
Chris Burke is caught offside. Luke Steele takes the free kick.
Shot by Korey Smith from a long way out goes over the crossbar.
Wade Elliott is adjudged to have handled the ball. Free kick taken by Paul Digby.
Free kick awarded for an unfair challenge on Jonathan Spector by Craig Davies. Boaz Myhill restarts play with the free kick.
The game restarts for the second half.
45:00 +1:30 Half time
Half Time The match has reached half-time.
Paul Digby fouled by Keith Fahey, the ref awards a free kick. Jay McEveley takes the free kick.
Free kick awarded for an unfair challenge on Paul Digby by Jordon Mutch. Korey Smith takes the direct free kick.
Unfair challenge on Morgaro Gomis by Paul Digby results in a free kick. David Murphy takes the free kick.
Jonathan Spector is caught offside. Free kick taken by Luke Steele.
Unfair challenge on Jonathan Spector by Paul Digby results in a free kick. Jordon Mutch restarts play with the free kick.
David Cotterill is flagged offside by the assistant referee. Boaz Myhill restarts play with the free kick.
Curled right-footed shot by Craig Davies.
Free kick awarded for an unfair challenge on Chris Dagnall by David Murphy. David Cotterill takes the free kick.
Marlon King is caught offside. Indirect free kick taken by Rob Edwards.
Craig Davies fouled by Curtis Davies, the ref awards a free kick. The free kick is swung in right-footed by David Cotterill, clearance by Jordon Mutch.
Free kick awarded for an unfair challenge on Jordon Mutch by Paul Digby. Free kick crossed right-footed by Jordon Mutch, save by Luke Steele.
Matty Done is flagged offside by the assistant referee. Boaz Myhill takes the indirect free kick.
26:24 Goal scored
Goal - Keith Fahey - Barnsley 1 - 2 Birmingham Keith Fahey grabs a goal from just outside the area to the bottom right corner of the goal. Barnsley 1-2 Birmingham.
The referee blows for offside. Scott Wiseman takes the free kick.
Effort on goal by Chris Burke from just inside the area clears the crossbar.
Assist on the goal came from David Cotterill.
18:20 Goal scored
Goal - Craig Davies - Barnsley 1 - 1 Birmingham Goal scored by Craig Davies from the edge of the penalty box to the bottom left corner of the goal. Barnsley 1-1 Birmingham.
Chris Burke produces a cross, Marlon King takes a shot. Save made by Luke Steele.
The free kick is delivered right-footed by Jordon Mutch from left wing, clearance made by Paul Digby.
Booking David Cotterill is given a yellow card.
David Cotterill challenges Wade Elliott unfairly and gives away a free kick.
Outswinging corner taken by David Cotterill from the right by-line played to the near post, Jordon Mutch makes a clearance.
Unfair challenge on Chris Burke by Paul Digby results in a free kick. Free kick crossed right-footed by Keith Fahey, save by Luke Steele.
7:04 Goal scored
Goal - Rob Edwards - Barnsley 0 - 1 Birmingham Headed own goal by Rob Edwards. Barnsley 0-1 Birmingham.
Chris Burke takes a shot. Blocked by Rob Edwards.
Chris Burke fouled by Jay McEveley, the ref awards a free kick. Jonathan Spector takes the free kick.
Effort from outside the penalty box by Korey Smith goes wide right of the target.
The official flags Matty Done offside. Boaz Myhill restarts play with the free kick.
Jordon Mutch concedes a free kick for a foul on Paul Digby. Jimmy McNulty takes the direct free kick.
The referee gets the game started.
Live text and data provided by The Press Association
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.