Kane Hemmings struck in the 12th minute of the game to seal the victory for the home side as Latics were made to rue
The game took a while to get going with Latics enjoying the early pressure without really causing a problem for Ross Turnbull.
Jonathan Forte started the game well and lobbed over the crossbar after dispossessing former central defender Jean-Yves M'Voto of the ball.
Only two minutes later, Mike Jones let rip from 25 yards but it was just wide of Turnbull's goal.
Barnsley took the lead from their first attack of the game. Milan Lalkovic got to the byline, crossed to Hemmings in the centre and he prodded past Jake Kean to give the home side the lead.
Latics responded well after going a goal down and caused a succession of corners. Jones' delivery caused the Barnsley defence all sorts of problems but they managed to keep out the danger.
Both sides were enjoying spells of possession but neither could trouble either goalkeeper as the game became a midfield battle.
Just before the break, Dominic Poleon dispossessed Lewin Nyatanga inside the area but just could not feed the ball back to the onrushing Jones as the chance past.
Latics had a chance straight from the kick off to equalise in the game. Forte managed to latch onto a through ball but could only fire his volley wide of the post.
Jacob Mellis entered the fray on 53 minutes to loud boos from the home crowd but he was straight into the action and received a lot of the ball.
Conor Wilkinson's introduction on 60 minutes added a spark to the Latics forward line and he made an instant impact, superbly bringing down the ball and forcing a corner which eventually came to nothing.
Both Wilkinson and Mellis had an impact on the game and the pair combined after the hour mark but Barnsley defender Martin Crainie managed to thwart the danger.
Latics were receiving a lot more of the possession and Carl Winchester's shot on 70 minutes stung the palms of goalkeeper Turnbull.
George Elokobi was the next to go close for Athletic as a bobbling ball in the Tykes box was not cleared but his strike evaded the crossbar.
Latics had to be alert at the other end of the pitch as Tykes' top goalscorer Conor Hourihane raced through on goal but James Wilson's last ditch tackle prevented the attack.
The visitors were struggling to create chances in the final third and resorted to pumping the ball forward in the last couple of minutes to get something out of the game.
Latics' best chance of the night came deep into additional time as Brian Wilson's cross found Forte on his own in the centre but the forward could not control and the chance passed.
Barnsley: Turnbull, Nyatanga, Cranie, Scowen, Hourihane, Hemmings (Winnall 70'), M'Voto, Ramage, Pearson, Lalkovic (Jennings 90+5'), Waring (Lita 90+5').
Subs not used: Davies, Digby, Smith, Kiwomya.
Oldham Athletic: Kean, B.Wilson, J.Wilson, Elokobi, Brown (Mills 59'), Kelly, Jones, Winchester, Philliskirk (Mellis 53'), Poleon (Wilkinson 59'), Forte
Subs not used: Coleman, Dieng, Kusunga, Lockwood.
Goals: Barnsley (Hemmings 12') 1-0 Oldham Athletic
Attendance: 9,135 (686 visiting supporters)