Mark Yeates’ equaliser was cancelled out in the final minute of the game as Latics suffered defeat.
The winger got Athletic back into the game with 10 minutes of the game remaining as Conor Hourihane gave Barnsley a half time lead.
In the final minute of the game, however, Barnsley central defender Kevin Long fired home from six yards to win the game for the Tykes, leaving Latics 18th in the Sky Bet League One table.
Manager David Dunn made two changes to his line up from Tuesday night as Cameron Dunmigan returned from international duty and Giorgio Rasulo’s impressive cameo performances against Chesterfield and Mansfield Town earned him a place in the starting 11.
It was the midfielder that set up the first chance of the afternoon as his long ball found Dominic Poleon but his attempted lob struck goalkeeper Adam Davies in the face and the ball was cleared.
The visitors started to control the opening embers of the game with Hourihane’s set pieces causing Latics a problem.
Marley Watkins was a threat and he knocked the ball beyond Brian Wilson after 10 minutes but was stopped in his tracks, causing the referee to reach for his pocket for the first time of the afternoon.
Athletic broke with Liam Kelly at the heart of the action. He sprayed a cross field ball across to Dummigan and his whipped delivery was just ahead of the onrushing Poleon.
Barnsley should have taken the lead a minute later as Adam Hammill picked the ball up on the left, shot, but a strong arm from Joel Coleman pushed it onto the post for a corner.
The visitors were taking the game to Latics and Watkins found himself through on goal on 20 minutes but it was Burnley loanee Dummigan who was back on the line to clear.
After a quiet ten minutes, it was the Tykes that took the lead on the half hour mark through Hourihane.
The midfielder picked the ball up on the edge of the box and the ball flew into the top corner, via a deflection, giving Coleman no chance.
Latics responded well but their final delivery into the box was something which was evading them.
Mark Yeates had a huge shout for a penalty turned down with 10 minutes of the half remaining.
He looked to be fouled in the penalty area but the referee did not give the spot kick to the dismay of the Oldham supporters.
Barnsley had a chance before the break to extend their lead as Watkins’ initial shot was blocked but the ball fell to Hammill but it was Dummigan that managed to clear the ball again.
In additional time at the end of the first half, a mix up between Barnsley goalkeeper Adam Davies and Aidy White almost presented Latics with an equaliser.
The Rotherham loanee played it over the head of Davies but it fell the wrong side of the post as Barnsley went into the break ahead.
Dunn brought on Jay Fulton for Timothee Dieng at the half time break and Latics started the second half with some good early pressure.
However, on 49 minutes, it was the impressive Dummigan who was forced into defender as Barnsley broke three on one with the defender but it was the Burnley loanee that came out on top.
He was the next man to go close as he met Rasulo’s measured pass in the box but Davies stood tall to save.
After the hour mark, Barnsley had the chance to extend their lead but Toney’s header smashed the crossbar and went away from danger.
Higdon came on for Latics on 65 minutes and made a difference, producing flick ons and being strong in his play.
With 20 minutes of the game remaining, Barnsley’s Ben Pearson slid in hard on Kelly, leaving the midfielder screaming on the floor.
After a little coming together between players, the referee produced a yellow card for the Manchester United man.
With Latics continuing to press for an equaliser, they got it with a little over 10 minutes left.
Yeates played a neat one-two with Poleon inside the penalty area and he slotted the ball beyond Davies to pull the scores level.
It was all Athletic as they went in search of a winner and it was Dummigan that almost got that two minutes later.
The full back, who was a stand out performer for Latics, curled goalwards from 18 yards but it went inches past Davies’ goal.
With Latics huffing and puffing for the winner, they were caught at the back as Barnsley stole the lead to win the game.
A free kick into the box was not dealt with properly and Kevin Long smashed into the back of the goal from six yards to win the game for Lee Johnson’s men.
Both Poleon and Yeates forced saves from the goalkeeper in additional time but it was Barnsley that came away with the three points.
Oldham Athletic: Coleman, Dummigan, J.Wilson, B.Wilson, Mills, Kelly, Dieng (Fulton 46’), Rasulo (Higdon 65’), Yeates, Philliskirk, Poleon.
Subs not used: Cornell, Brown, Eckersley, Winchester, Fuller.
Barnsley: Davies, Bree, Mawson, Long, A. White (G. Smith 74’), Hourihane, Pearson, Hammill, Watkins, Isgrove (Winnall 68’), Toney (Jackson 84’).
Subs not used: Townsend, Roberts, Nyatanga, Wabara.
Goals: Oldham Athletic (Yeates 78’) 1-2 Barnsley (Hourihane 30’, Long 89’)
Attendance: 4,300 (584 visiting supporters)