Boro competed well in the first half despite a lack of clear-cut chances for either side, but conceded twice after the interval.
Alex Mowatt’s in-swinging corner put the hosts ahead when Boro keeper Marcus Bettinelli made a mess of the set-piece and was beaten at his near post.
The points were sealed 15 minutes from time when Callum Brittain’s cross was headed home by Tykes frontman Daryl Dike as Valerien Ismael’s side continued their push for a play-off place.
The result leaves Boro 10th in the table with five games to play, with their chances of finishing in the play-offs as good as over.
Warnock will now prepare his side for a home game against QPR next weekend.
Here’s how the Teessiders fared at Oakwell.
. BARNSLEY, ENGLAND - APRIL 10: Grant Hall of Middlesbrough is put under pressure by Daryl Dike of Barnsley FC during the Sky Bet Championship match between Barnsley and Middlesbrough at Oakwell Stadium on April 10, 2021 in Barnsley, England. Sporting stadiums around the UK remain under strict restrictions due to the Coronavirus Pandemic as Government social distancing laws prohibit fans inside venues resulting in games being played behind closed doors. (Photo by Ross Kinnaird/Getty Images)
Grant Hall of Middlesbrough is put under pressure by Daryl Dike of Barnsley. Photo: Ross Kinnaird
. Marcus Bettinelli - 4
Another unconvincing display. Made a mess of Barnsley’s opener when he was beaten by Mowatt’s in-swinging corner. 4 Photo: Alex Burstow
. Darnell Fisher - 6
Looked solid on the right side of Boro’s defence against Barnsley forward Cauley Woodrow. 6 Photo: Catherine Ivill
. Grant Hall - 7
Commanding in the first half as he kept Barnsley frontman Daryl Dike on the fringes. Boro’s best yet again. 7 Photo: Stu Forster
. Paddy McNair - 7
Deliveries from set-pieces were a threat but Boro couldn’t capitalise. 7 Photo: Alex Pantling
1. Marcus Bettinelli - 4
Another unconvincing display. Made a mess of Barnsley’s opener when he was beaten by Mowatt’s in-swinging corner. 4 Photo: Alex Burstow
2. Darnell Fisher - 6
Looked solid on the right side of Boro’s defence against Barnsley forward Cauley Woodrow. 6 Photo: Catherine Ivill
3. Grant Hall - 7
Commanding in the first half as he kept Barnsley frontman Daryl Dike on the fringes. Boro’s best yet again. 7 Photo: Stu Forster
4. Paddy McNair - 7
Deliveries from set-pieces were a threat but Boro couldn’t capitalise. 7 Photo: Alex Pantling