Goals from Tom Bradshaw and Sam Winnall in the space of four minutes put Barnsley in the driving seat, but Jacques Maghoma and Lukas Jutkiewicz (pen) scored to make it all-square.
Barnsley had to play with 10 men for over half an hour after Marc Roberts was sent-off for committing a foul which resulted in the penalty being awarded.
Winnall put a first-minute effort wide while Birmingham’s Che Adams saw his angled shot go beyond the far post shortly afterwards.
The visitors created another opening when Greg Stewart picked out Jonathan Grounds who chested the ball down before firing over from a good position inside the area.
Visiting skipper Michael Morrison came to his side’s rescue, making a vital clearance when Tom Bradshaw played the ball across the six-yard box, trying to find Winnall.
Barnsley took a 24th-minute lead when Marley Watkins got to the right-hand byline and pulled the ball back to Bradshaw whose first-time shot beat Tomasz Kuszczak.
Winnable (28) soon put the hosts further ahead, climbing highest inside the six-yard box to plant a firm header past Kuszczak from Conor Hourihane’s corner.
As the lively Winnall waited to pounce again soon after, Kuszczak had to claw the ball away.
Birmingham reduced the arrears when Adams found Maghoma (33) on the left and he advanced into the area before beating Adam Davies with a fine, low finish.
The visitors began brightly after the break with Adams having a deflected effort saved by Davies.
Birmingham were awarded a penalty in the 52nd minute after Adams was bundled over in the area by Roberts, who was duly shown the red card. Jutkiewicz, on as a substitute at the start of the second half, scored from the spot, blasting his effort straight down the middle.
David Cotterill then put a shot on the turn wide as Birmingham looked to turn the screw.
Kuszczak then came to his side’s rescue, producing a superb save to tip Winnall’s header over the bar.
Watkins also put an effort on target, but his shot was easily gathered by the keeper.
Sam Morsy found the target from 25 yards out, but his low drive was comfortably saved by Kuszczak and Cotterill put a free-kick wide late on.