Chesterfield again marked another fight back with a point after Paul Hall scored his 100th league goal to stretch their unbeaten run to 15 league games.
Hall made no mistake in the 89th minute to cancel out Tommy Black's 48th minute long-range shot that surprised keeper Barry Roche.
But the game ended in controversy when Gills keeper Jason Brown confronted the home fans behind his goal and had to be lead away by stewards.
Brown later claimed he was the victim of racial taunting from the Chesterfield supporters and the club could now hold an investigation into the alleged incident.
Brown had certainly frustrated the home side with a number of acrobatic saves as Gillingham struggled to cope with Chesterfield's strength and pace.
The first half was totally one-sided with Chesterfield driving Gillingham back but they couldn't find the vital killer touch.
Gillingham were far better after the break and took the lead with a 48th minute counter-attack that saw Black open his account for his 10th club.
The on-loan Palace winger tried a 25-yard shot but mis-hit his effort only for Roche to see the ball creep past him and inside his right-hand post.
Roche later accepted the blame and he was almost beaten again when Alan Pouton smashed a shot against the post from the edge of the box.
But Chesterfield were soon hammering away at the Gills defence and Brown did well to hold a Hall header on the line.
He then did even better to tip over a swerving a 25-yard drive from Jamie O'Hara but the pressure finally told in the 89th minute.
Leon Johnson was doubled up on the floor after stopping a Kevan Hurst piledriver and, with the centre-half out of the action, Chesterfield knocked the ball back in and Hall found the space to place a right-foot shot past Brown from 12 yards.
His landmark goal was well taken but Gillingham almost snatched victory in stoppage time when Neil Harris saw his right-foot volley brilliantly saved by Roche who more than made up for his earlier error.