First-half goals from Ivan Toney and Emiliano Marcondes secured a 2–0 victory for Brentford while Swansea's Jay Fulton was sent off midway through the second half for a foul on Mathias Jensen.
Brentford's victory meant they had been promoted via the English Football League play-offs for the first time in ten attempts.
Twelve minutes later Bournemouth were reduced to ten players when Chris Mepham was sent off for a professional foul on Bryan Mbeumo.
André Ayew opened the scoring in the 39th minute with a curling left-footed shot past Bradley Collins in the Barnsley goal.
Carlton Morris hit Swansea City's crossbar in second-half injury time but the match ended 1–0.
[26] With three minutes of the half remaining, a poor back-header from Swansea's Marc Guéhi fell to Mbeumo but he lost his footings as he swivelled to shoot.
In the 58th minute, Mbeumo's shot went over Swansea's crossbar before Lowe's strike from inside the Brentford penalty area was wide of the target.
With 29 minutes remaining, Swansea made their first substitution of the match, with striker Liam Cullen coming on to replace defender Kyle Naughton.
Two minutes later Mbeumo's cross was struck goal-bound by Ethan Pinnock but the ball deflected away off his teammate Pontus Jansson.
[27] Midway through the second half, Swansea made their second substitution, with Hourihane being replaced by Yan Dhanda and within a minute they were reduced to ten men as Jay Fulton was shown a red card for a foul from behind on Mathias Jensen.
In the 70th minute, Vitaly Janelt was booked for a foul on Roberts before a long-range free kick from Marcondes went over the Swansea crossbar.
Brentford then made a double-substitution: Saman Ghoddos and Marcus Forss came on to replace Janelt and Canós, and then with ten minutes remaining, Winston Reid came on for an injured Jansson.
[29] Man of the Match: Emiliano Marcondes (Brentford)[1] Thomas Frank became the first Danish head coach to achieve promotion to the Premier League.
"[29] Losing head coach Steve Cooper was disappointed in his side's performance, noting "We started the game second best and some defining moments didn't go our way.