Josh Law struck the winning goal in the first half as his inch-perfect free kick was the difference between the teams this afternoon.
Manager John Sheridan made two changes to the side which played Mansfield Town on Tuesday night.
Lee Erwin, who has missed the last month through injury, was part of the attack and Athletic went in search of a goal from the first minute.
However, it would be Gillingham who had the first opportunity of the first half on 11 minutes.
The ball landed at the feet of defender Chris Herd but Latics threw bodies in the way of his effort and managed to scramble the ball clear.
A huge break in play followed as Peter Clarke had to be bandaged up and Gills goalkeeper Stuart Nelson received stitches in his mouth from the doctor.
After a seven minute stoppage, Latics continued to attack as Clarke forced Nelson into a smart save midway through the second half.
Billy Knott had a free kick saved by goalkeeper Connor Ripley on the half hour mark whilst minutes later Ryan McLaughlin’s low strike was saved by Nelson.
Ousmane Fane set out on a surging run on 37 minutes, he fed Billy Mckay and he was tripped on the edge of the box by Paul Konchesky, who received a booking.
Law stepped up, and in a similar position to his goal against Shrewsbury Town earlier in the season, curled into the top corner from 20 yards.
Gillingham had two chances through Max Ehmer soon after but both were well saved by Ripley.
His first was an overhead kick which forced Ripley into a full stretch dive whilst minutes later he had to save Ehmer’s volley from the edge of the box.
Latics felt they should have been award a penalty on 50 minutes as Flynn was tripped in the penalty area but the referee waved away the protests.
Soon after, Erwin’s neat skill took him away from three players but he poked past the far post as Latics continued to go in search of a second goal.
Athletic looked comfortable in possession and Gillingham were struggling to get hold of the ball.
Just before the hour mark, Flynn’s deflected shot fell onto the head of Mckay but Nelson managed to tip the ball around the post at full stretch to deny the striker.
Law was a real threat from set pieces and he almost made it two on 64 minutes but his free kick from 25 yards was tipped over the crossbar by the goalkeeper.
Gillingham started to put the pressure on the Oldham Athletic defence but they were met by a stubborn back three in George Edmundson, Clarke and Brian Wilson.
Edmundson threw himself in front of a Josh Wright effort, Bradley Dack’s free kick went wide and another effort went wide of Ripley’s far post.
Dack was booked for diving in the final 10 minutes of the game as Latics continued to control the game.
And Athletic could and maybe should have extended their lead in the final 10 minutes.
Dummigan’s cross found Clarke in the centre but he could not dig his shot out, whilst a minute later, McLaughlin struck over from the resulting corner.
Second year scholar Brendy Glackin came on for the final few minutes of the game replacing the injured Darius Osei and he made a good impact.
In the final minutes of the game, Billy Knott forced Ripley into a save whilst in the final minute Athletic could have extended their lead.
Law’s fierce strike from 25 yards on the volley struck the top of the crossbar but that did not matter as Latics recorded a vital three points with a 1-0 victory.
Oldham Athletic: Ripley, Edmundson, Clarke, Wilson, Dummigan, McLaughlin, Fane, Law, Flynn, Erwin (Osei 60’, Glackin 87’), Mckay (Green 80’).
Subs not used: Kettings, King, Reckord, Banks.
Gillingham: Nelson, Jackson, Herd (Osedebe 70’), Ehmer, Wagstaff, Knott, Konchesky, List (Donnelly 68’), Dack, Wright, Emmanuel-Thomas (McDonald 60’).
Subs not used: Hadler, Oldaker, Dickinson, Byrne.
Goals: Oldham Athletic (Law 39’) 1-0 Gillingham