Match ends, Barnsley 3, Sheffield United 2.
Sheffield United's play-off hopes suffered a setback as Tom Bradshaw's late goal gave Barnsley victory.
The home side began positively and Gary Gardner put them ahead with a fierce drive from the edge of the box.
John Fleck equalised as the Blades raised their game after the break and Leon Clarke beat Adam Davies at the second attempt to give them the lead.
Oli McBurnie brought Barnsley level from close range and Bradshaw nodded in Kieffer Moore's cross to seal the win.
The three points were absolutely crucial for Jose Morais' side, who remain 22nd in the table but closed to within two points of Bolton, who lost at Derby.
It was only their second victory in 14 matches - and first at home since early November.
George Moncur hit the United bar in the early stages before Gardner punished the visitors as they failed to clear properly from a corner.
But Chris Wilder's side raised their game, with Fleck finding the top corner from Clarke's assist before the striker added his 17th of the season.
The signs were ominous for Barnsley, who have lost nine times at home this season, but McBurnie capitalised when Simon Moore failed to hold an Adam Hammill shot and after Davies made a point-blank save from Clarke, the switch to 4-3-3 paid off as Bradshaw sealed the points with his first goal since December.
United have now won only once in seven games and the defeat left them ninth, four points outside the top six.
Barnsley head coach Jose Morais told BBC Radio Sheffield:
"I'm happy for the team because they really deserved this, and for the fans, because they created a fantastic atmosphere.
"And I'm very happy that we turned a result that was negative in the second half into a positive result, and this was the first time that it's happened since I've been here.
"We understand now that it is possible to win - even when we are one goal down it's possible to turn the result.
"We understand that the work they are doing can pay off, and this is the most important thing from the game today."
Sheffield United boss Chris Wilder told BBC Radio Sheffield:
"They were the better team in the first half so we changed a couple of things and for 20-25 minutes we absolutely dominated the game.
"We got ourselves back into it, went in front, and from then on there should have only been one winner.
"It's a very valuable three points for them and a damaging result for us.
"I think we're a really good side, but we're just missing something that wraps up games and the damage today is difficult to take."
- 6LindsayBooked at 45mins
- 10MoncurSubstituted forBradshawat 69'minutes
- 11IsgroveSubstituted forHammillat 59'minutes
- 15McBurnieBooked at 34minsSubstituted forCavareat 90+3'minutes
- 13WrightSubstituted forWilsonat 90+1'minutes
- 5O'ConnellBooked at 36mins
- 20EvansSubstituted forSharpat 39'minutes
- 36BrooksBooked at 45minsSubstituted forDuffyat 49'minutes
- Scott Duncan
- Shots on Target
Second Half ends, Barnsley 3, Sheffield United 2.
Substitution, Barnsley. Dimitri Kevin Cavare replaces Oliver McBurnie.
Attempt missed. Billy Sharp (Sheffield United) left footed shot from the centre of the box is too high. Assisted by Leon Clarke.
Attempt missed. Brad Potts (Barnsley) right footed shot from outside the box is close, but misses to the left. Assisted by Oliver McBurnie.
Substitution, Sheffield United. James Wilson replaces Jake M Wright.
Jack O'Connell (Sheffield United) wins a free kick in the attacking half.
Foul by Kieffer Moore (Barnsley).
Goal! Barnsley 3, Sheffield United 2. Tom Bradshaw (Barnsley) header from very close range to the centre of the goal. Assisted by Kieffer Moore with a cross following a set piece situation.
Foul by Chris Basham (Sheffield United).
Gary Gardner (Barnsley) wins a free kick in the defensive half.
Chris Basham (Sheffield United) wins a free kick in the defensive half.
Foul by Kieffer Moore (Barnsley).
Attempt missed. Gary Gardner (Barnsley) right footed shot from outside the box is high and wide to the right.
Jake M Wright (Sheffield United) wins a free kick in the defensive half.
Foul by Tom Bradshaw (Barnsley).
Corner, Sheffield United. Conceded by Adam Jackson.
Offside, Sheffield United. Leon Clarke tries a through ball, but Billy Sharp is caught offside.
Attempt saved. Leon Clarke (Sheffield United) header from the centre of the box is saved in the top right corner. Assisted by John Fleck with a cross.
Attempt missed. Enda Stevens (Sheffield United) left footed shot from the left side of the box misses to the right. Assisted by Mark Duffy.