The Reds blew an early two-goal lead as they lost at home to Notts County on Tuesday night.
Barnsley made a dream start as Devante Cole and Conor Hourihane scored and assisted each other to put the hosts 2-0 up after 13 minutes.
Garry Thompson pulled one back after 20 then, following a host of missed Barnsley chances, Michael Petrasso bagged a match-winning brace.
Barnsley have now suffered back-to-back defeats and missed the chance to close the gap on County who are in the play-off places. The Reds are now just three points above the bottom of the league.
Danny Wilson made one change to the side that lost at Peterborough on Saturday with teenager Paul Digby coming in for the suspended James Bailey.
It was another 19-year-old who opened the scoring on eight minutes when Cole latched onto Hourihane's superb pass and smashed in a low left-footed volley from ten yards out.
Cole then returned the favour five minutes later as, after Sam Winnall won the ball and played the Manchester City loanee through on goalkeeper, he unselfishly squared to Hourihane who fired into the gaping net for his seventh of the season.
County spoiled the Oakwell party after 20 minutes when Thompson lobbed Ross Turnbull from 30 yards to make it 2-1.
Ryan Williams almost restored the two-goal advantage on 39 minutes when he brought down Luke Berry's high pass and powered a 15-yard shot which hit the base of the right post.
Barnsley's defence was caught out just before the break but Petrasso, clean through, fired high and wide.
The Reds began the second half on top and former Manchester United goalkeeper Roy Carroll saved one-on-ones from Cole and Winnall.
But the visitors levelled against the run of play on 62 minutes when Petrasso headed in Thompson's left wing cross.
Thompson should have made it 3-2 seconds later but sent his close range volley wide. Petrasso eventually put County in front when he ran onto a header by former Red Gary Jones and smashed a finish through Turnbull on 73 minutes.
Cole almost levelled on 87 minutes with a curling shot that went just wide after a superb turn.