Goals from Christophe Berra and David McGoldrick in the last 10 minutes gave Town a share of the points at Oakwell.
Chris O’Grady and a free-kick from Tomasz Cywka had put the Tykes in control of the game with the final stages approaching before Berra gave Blues a lifeline from close range on 81 minutes.
Then McGoldrick blasted in his 15th goal of the season from a free-kick to earn Blues a point and that could have been three but debutant Paul Green was denied in the last minute by a brilliant block.
Town stayed with the same side that started in the win against Bolton last weekend, new loan arrival Green taking a place on the bench after arriving from Leeds until the end of the season, with Paul Taylor missing the game with a tooth abscess.
O’Grady had a great chance to open the scoring for Barnsley inside the first 10 minutes, the striker sidefooting well wide after being given space inside the Town box.
McGoldrick responded for Blues with a low drive from 25 yards that Luke Steele gathered.
The Tykes had the better of the first 15 minutes though and it was Grady who made the breakthrough, the frontman turning on the ball and sending a left foot strike into the bottom corner of Dean Gerken’s net.
Aaron Cresswell was so close to following up his free-kick goal at Oakwell last year with another set-piece on 20 minutes, a terrific strike from 25 yards hitting the post.
Town forced the Tykes back looking for an equaliser and a sublime cross from Stephen Hunt almost brought its rewards with McGoldrick inches away from converting.
Jim O’Brien had a shot beaten out by the Town defence, Hunt almost setting up McGoldrick at the other end, then Blues’ leading scorer dragged his shot wide from the edge of the box.
O’Grady and Nick Proschwitz were crowded out 10 yards out after good work by Dale Jennings, Frank Nouble then failing to get any power with a left foot effort after driving into Tykes’ territory.
O’Brien robbed Daryl Murphy as the Irishman escaped his marker, Tommy Smith then thumping a header wide from a Hunt corner as an even first-half came to an end.
Cywka replaced Brek Shea for Barnsley before the second-half got underway, Blues also making a change just seven minutes after the restart with Nouble making way for Paul Anderson.
Cole Skuse was inches wide of an equaliser for Town with a left foot effort and then failed to find the net from 15 yards after Steele had pushed out Hunt’s cross.
Anderson sidefooted Hunt’s cross just wide as Town continued to threaten an equaliser, Steele then denying Murphy and Anderson in a double save on 66 minutes.
O’Brien exchanged passes with O’Grady before firing over, Tom Kennedy then doing well at the other end to head clear from Cresswell’s dangerous cross.
Martin Woods for the hosts and Green for his Town debut joined the action on 70 minutes, Jack Hunt and Jay Tabb the players making way.
Before either had touched the ball, the Tykes made it two, Cywka firing in a free-kick that took a deflection before finding the net.
Liam Lawrence became Barnsley’s third change, replacing Proschwitz for the final 15 minutes but Town were back in the game on 81 minutes, Berra forcing the ball in from close range after O’Brien had cleared off the line from Smith.
Hunt could have levelled within a minute of the goal, the Republic of Ireland international flicking Murphy’s cross just wide of the far post.
The Town fans didn’t have to wait long for the equaliser though, McGoldrick’s free-kick hitting the roof of the net after taking a deflection.
Green almost won it for Town when he got on the end of the loose ball inside the Tykes’ area but his shot was blocked as Blues finished the game pushing for the three points.