As a result of a first-half strike from Marc Roberts and two late goals in the space of two minutes from Sam Winnall, Birmingham slumped to their first home defeat in eight games and in the process wasted a wonderful opportunity to consolidate their top-six position.
Barnsley boss Paul Heckingbottom was full of praise for the battling performance from his young side and commended them for hitting back in such a positive fashion after their 5-2 home mauling at the hands of Nottingham Forest.
Heckingbottom said: “For the last two weeks we have been working really hard on set-pieces. It is important and it paid off against Birmingham.
“It is good from a coach’s point of view and when they get the reward it is very pleasing.”
The Barnsley boss added: “We have only had one defeat in six games. We’ve only had two matches this season when we have not been in the game.
“This is the level of performance you need to be successful in the Championship. Sometimes you have to admit that is not good enough against some teams with the quality they possess.
“Although Winnall scored twice I thought it was a fine team performance. He is a winner on the pitch as he proved against Birmingham when he was always a goal threat.”
In recent games Birmingham have lived dangerously but on this occasion they failed to enjoy any good fortune against a tenacious Barnsley side and had to play the final 20 minutes with 10 men after David Davis was sent off for two yellow cards.
Adam Davies, reputedly the busiest goalkeeper in the Championship, was in top form as quickly demonstrated when he bravely cut out a cross to prevent Lukas Jutkiewicz getting in a close-range header.
Barnsley, showing little sign of being demoralised after their heavy defeat by Forest in their previous game, produced some lively attacks with Winnall having a snap shot blocked by Birmingham’s dominant skipper Michael Morrison.
Ryan Kent appealed unsuccessfully for a penalty as the Yorkshire club strived to take the lead.
Morrison and Ryan Shotton had to be in top form keeping the likes of Tom Bradshaw, Kent and Winnall in check in this period.
But it was Davies who really excelled to live up to his growing reputation in the 12th minute.
Birmingham produced an excellent move which started with a pass from Morrison to Josh Dacres-Cogley.
He put the ball inside the Barnsley defence to allow Dave Cotterill to send in a low cross to Clayton Donaldson only to see Davies make a point-blank save at the far post.
A couple of minutes later it was the turn of Tomasz Kuszczak to dazzle when he dived low to his left to push away an on-target effort from the persistent Kent.
The general quality of play was of a very good standard with Jutkiewicz again going close for Birmingham with a snap shot wide of the post, while the confident handling of Davies was an inspiration for the Tykes.
Birmingham struggled to wear down the opposition. Barnsley displayed a high level of energy which enabled them to keep the home side at full stretch.
The persistence of the young Barnsley side paid off in the 38th minute when Roberts was on hand to score with a glancing header from skipper Conor Hourihane’s free-kick deep on the right.
Four minutes later Davies was beaten by a blistering left-footed shot from Davis but on this occasion the post came to Barnsley’s rescue.
There is little doubt Barnsley were boosted by their first-half showing while Birmingham were decidedly frustrated with their inability to dominate their opposition.
With their defence out of position it was left to Kuszczak to push away a Bradshaw rising drive as Barnsley threatened to increase their slender advantage.
Birmingham’s hopes of getting back in the game suffered a setback when Davis collected a second yellow card for a reckless tackle on the halfway line.
The hosts made a determined attempt to make amends but six minutes from time Barnsley settled the game when Winnall headed home a Hourihane corner and two minutes later he notched his second goal from another Hourihane free-kick.