Gills captain John Egan gave the visitors the lead midway through the first half when Tommy Lee was unable to deal with an in-swinging freekick and Egan was on hand to tap home from close range.
Within ten minutes the Spireites were level when man of the match Rai Simons ran onto Sam Morsy's ball and finished like an experienced pro to score his first Football League goal.
Following a flurry of Spireites attacks after the restart the Gills were ahead again on 54 minutes when Rory Donnelly met a cross to head his side in front, and on 72 minutes the Gills had their third from another header as Lennon diverted a corner.
After an even start to proceedings, the Spireites started to control possession and captain Morsy had the first half-chance of the game in the ninth minute but his 20-yard drive rose just over the bar.
The first half carried on in the same vein until the 26th minute and it was only through a rare error from the hosts' 'keeper Lee that lead to the deadlock being broken. Former Spireites loanee Brennan Dickinson delivered a mean freekick which Lee was unable to hold onto and the ball fell to the visitors' captain Egan who rolled the balled into the empty net.
Ten minutes later the Spireites found their equaliser, this time through a Gillingham defensive error. Dan Gardner intercepted a wayward pass and powered forwards before finding Morsy who in turn played Simons through on goal and he calmly finished for his first Spireites and Football League goal.
The Spireites started the second half brightly and again it was Morsy with the first effort on goal in the 51st minute when he forced Stuart Nelson into a save from a curling shot after good build up play from Jay O’Shea.
A couple of minutes after the Spireites came close, the visitors re-took the lead against the run of play through Donnelly. He rose to meet a fine Jermaine McGlashan cross and powerfully headed home past a helpless Lee from 17 yards.
The hosts came close to equalising for a second time in the match through the ever-impressive Simons in the 68th minute but he couldn’t angle his volley on target after Ian Evatt had found him with a knock down.
Gillingham came inches away from extending their lead further with just under 20 minutes to go when the lively McGlashan hit the post from inside the area after a fine counter attack. Josh Wright fired the rebound back in from 25 yards but Lee was able to make a fine diving save.
The visitors got their third goal from the resulting corner when it was flicked on and Lennon got the final touch with his head to steer the ball into the net.
The Spireites continued to dominate possession and create chances to get back into the game and came close through Sylvan Ebanks-Blake, Morsy and O’Shea but the visitors defence held firm.
Evatt had the final chance of the match but his close-range header was superbly tipped over the bar by Nelson.
Chesterfield: Lee (gk) - Jones, Raglan, Evatt, O'Neil - Herd (Dieseruvwe 72'), Morsy, Simons, O'Shea, Gardner - Ebanks-Blake
Subs not sued: Chapman (gk), Talbot, Donohue, Orrell, Humphreys, Hird
Gillingham Nelson (gk), Egan (c), Ehmer (A. Morris 46'), Hessenthaler, McGlashan (Osadebe 79'), Donnelly, Norris, Dack, Dickenson (Garmston 77'), Lennon, Wright
Subs not used: Houghton, Williamson, McDonald, G. Morris
Chesterfield: Siomns 36'
Gillingham: Egan 32', Donnelly 54', Lennon 72'
Attendance: 6,026 (396 away fans)