Brentford will have to settle for a Championship Play-Off place after a 2-1 defeat in the last league game to be held at Griffin Park.
The Bees started the game the brighter with Emiliano Marcondes taking a strike that went just wide in the early minutes.
However, it was Barnsley that took the lead four minutes before the interval – Callum Styles striking a low effort that beat Brentford keeper David Raya at his near post.
Barnsley could have doubled their advantage at the start of the second-half only for Jacob Brown’s goalbound effort to be expertly blocked by Ethan Pinnock.
Brentford then equalised arguably against the run of play as Josh Dasilva lashed home in the 73rd minute after an incredible run from Said Benrahma saw the Algerian carry the ball from his own half to the penalty box.
With West Brom only managing to draw with QPR, Brentford went in search for another goal which would have seen them promoted.
But it was Barnsley who found a winner as Patrick Schmidt squared the ball for Clarke Oduor to tap home – a goal that will retain the side’s Championship status should Wigan receive a points deduction as expected.