A double from Andy Barcham, and a Cody McDonald header, earned the Gills an important victory over a stubborn Accrington outfit who had gone into the game on a five match unbeaten run.
The Gills were the only side in the top seven in League Two to win and the result took them up to sixth in the table. They are level on points with both Rotherham United and Shrewsbury Town, who are fourth and fifth respectively, but do have a game in hand and only four points behind third place Wycombe.
Gillingham boss Andy Hessenthaler was able to name the same squad as that which started Tuesday night's game at Southend as Adebayo Akinfenwa had recovered from the illness which forced his substitution at Roots Hall.
The Gills got off to a perfect start taking the lead with just 81 seconds on the clock, Andy Barcham raced onto a through ball from Kevin Maher and as a defender and keeper Alex Cisak appeared to hinder each other he managed to poke the ball, albeit agonisingly slowly, home from the edge of the area.
The visitors were handed an ideal opportunity to equalise in the seventh minute when Maher was adjudged to have tripped Stanley skipper Andy Proctor in the area and the well-placed referee David Phillips pointed immediately to the spot.
However defender Phil Edwards, who had previously converted nine spot-kicks in his ten goals this season, drilled his penalty low to Alan Julian's right but saw the ball rebound off the keepers right-hand upright.
Stanley, who looked a force to be reckoned with, did equalise in the 14th minute when John Nutter failed to deal with a Dean Winnard cross, gifting the ball to Sean McConville who rammed home from close range.
Just moments later Jimmy Ryan tested Julian with a low strike from distance.
Although Accrington were in the driving seat, the Gills went close in the 20th minute when Maher's deep corner was met by Cody McDonald but his header went an inch or two over the top.
There was nothing pretty about the way that John Coleman's side went about their business but it was certainly effective with Proctor seemingly everywhere.
Jack Payne became the first recipient of a yellow card in the 39th minute for a trip on Ian Craney.
Just as the Gills had started the half well, they finished it well too by re-taking the lead in the first minute of time added on. Garry Richards played the ball forward, Akinfenwa glanced the ball on and the advancing Barcham ran on to clip the ball past the advancing Cisak.
The Gills should have increased their lead in the 51st minute but despite all Akinfenwa's hard work down the left, turning his marker and laying the ball across the face of goal perfectly for McDonald, the leading scorer inexplicably stabbed the ball wide from around six yards.
McDonald made amends though just five minutes later when he netted his 19th goal of the season. Following another burst forward from Barcham, Nutter played in a great curling cross from the left and the Norwich City loanee rose at the far post to plant a decent header past Cisak. It was no wonder part of his goal celebration saw him wiping his brow.
The third goal seemed to knock Stanley out of their stride and they didn't create too much in the remainder of the game, the best chance was headed over the top by Proctor.
The Gills first change came in the 66th minute when Joe Martin
replaced Nutter and a minute later Craig Lindfield became Accrington's first substitute when Jimmy Ryan was withdrawn.
Terry Gornell was the first visitor to be booked for a foul on Gills skipper Barry Fuller in the 69th minute and in the latter stages, as Stanley lost their composure, both Craney, who had not been slow in mouthing off at a number of decisions, and Proctor were shown yellow cards for verbals directed at the referee.
Two minutes later Martin had a header cleared off the line by McConville when Richards flicked on a Maher header after a corner came back out to him.
Akinfenwa was booked in the 73rd minute by the referee for persistent infringements, but he was certainly the victim more than the perpetrator on a number of occasions, including this one.
The Gills looked happy to hold what they had in the closing stages and coasted through to the final whistle. The result extended the unbeaten run to eleven games with a fourth victory in that time.
Two former Gillingham defenders from the Eighties would have had differing views of the game, while Joe Hinnigan was the Stanley physio, Alan Walker was in the directors box alongside ex-youth team skipper Lloyd Hume.
Attendance: 5299 (62 Accrington)
Julian, Fuller, Richards, Lawrence, Nutter&nbsp;(Martin 66), Weston, Maher, Payne, Barcham, McDonald (Oli 89), Akinfenwa.
Unused subs: Cronin, Gowling, Sinclair, Jackman, Rooney.
Cisak, Jacobson, Edwards, Hessey, Winnard, Joyce, Craney, Proctor, Ryan (Lindfield 67), McConville, Gornell.
Unused subs: Lindfield, Putterill, Parkinson, Dunbavin, Long, Smyth, Murphy.
Referee: David Phillips
Assistants: Mike George and Tim Robinson
4th Official: Philip Knight