In a mad first 14 minutes, Latics found themselves two goals down after John Marquis scored a double to give Gills the advantage.
Ten minutes later, the scores were level. Liam Kelly struck the first after Danny Philliskirk saw his penalty saved and Dominic Poleon pounced on a goalkeeping error to equalise.
However, with only 20 minutes of the game to play, Dack struck from the edge of the box to seal the victory for the home side and Latics travelled back to Lancashire pointless.
In what was a dull opening five minutes, the game exploded into life on seven minutes as Gillingham took the lead.
Marquis drifted past the defence and curled the ball past Paul Rachubka to give the home side the advantage.
One turned into two on 14 minutes as the striker notched his second goal of the game.
This time Marquis capitalised on a mistake by James Wilson and stroked past Rachubka from the edge of the box to extend their lead.
Latics needed a response and they were presented with a chance to pull a goal back on 19 minutes as Connor Brown was bundled to the floor and the referee awarded a spot kick.
Danny Philliskirk stepped up; Stuart Nelson guessed the right way but could only parry his effort into the path of Kelly to grab his first goal for the club.
The visitors were in the ascendancy and deservedly equalised on 23 minutes after Poleon's solo effort.
The 21-year-old did not give up the lost cause after the ball was knocked back to the Gills goalkeeper. The goalkeeper miscontrolled the back pass and Poleon won the ball off him and knocked the ball into an empty goal to equalise midway through the first half.
The home side were shellshocked and Latics were looking to capitalise on their vulnerability.
Gillingham did catch Latics on the break just after the half hour but Rachubka pulled off a wonderful diving save to deny Josh Pritchard.
Strikers Amari Morgan-Smith and Poleon were causing the Gills defenders into errors and the pair worked well to set up Mike Jones minutes later but the midfielder hit his shot straight at the goalkeeper with the goal gaping.
As the half was coming to a close, Carl Winchester should have done better deep into stoppage time as he mishit his volley from eight yards and the referee soon blew to signal the end of a manic first half.
The second half did not start as explosively as the first but both sides had good spells of possession.
Connor Brown, who was proving to be unpopular with the home supporters, managed to block a shot inside the box to keep the scores level five minutes into the half.
Gills maintained their pressure on Rachubka's goal and it was George Elokobi that was the next to clear the danger from inside his own box as Dack waited to pounce.
The game started to turn and it was Athletic that were enjoying the best of the football.
On the hour mark, goalscorer Kelly was adamant his side should have been awarded a penalty as Pritchard looked to handle in the box but the referee waved away the appeals.
Against the run of play, the Gills regained the lead on 70 minutes. Dack received the ball on the edge of the box and volleyed goalwards. Rachubka managed to get a hand onto the ball but could not prevent it from hitting the back of the net.
Latics moved quickly and bought on new signing Jacob Mellis and James Dayton to try and salvage something from the game.
Mellis was proving to be a handful for the Gillingham defenders and he fired narrowly over the bar after creating space for himself inside the area.
With only five minutes of the game remaining, Latics went mightily close to equalising for a second time but Morgan-Smith's header under pressure was knocked behind by Nelson.
Latics pressed and pressed to get something out of the game but were finding it hard to get past the stubborn Gillingham defence.
The visitors threw everything forward in a bid to gain a point from the game but unfortunately fell just short.
Gillingham: Nelson, Garmston (Dickenson 67'), Egan, Ehmer, Loft, Hessenthaler (McGlashan 67'), Marquis (Martin 90+1'), McDonald, Pritchard, Dack, Hoyte.
Subs not used: Legge, Morris, Galbraith, Norris.
Oldham Athletic: Rachubka, B.Wilson, J.Wilson, Elokobi, Brown, Kelly, Jones, Winchester (Mellis 72'), Philliskirk (Dayton 72'), Morgan-Smith, Poleon.
Subs not used: Dieng, Coleman, Lockwood, Kusunga, Jacobs.
Goals: Gillingham (Marquis 7', 14', Dack 70') 3-2 Oldham Athletic (Kelly 19', Poleon 23')
Attendance: 4,959 (236 visiting supporters)