Gillingham were caught cold in the second minute when Jon Nolan whipped in a free-kick from the right and Conor Wilkinson headed in from eight yards.
Chesterfield were causing problems down the flanks but Gillingham created little until the 32nd minute when Emmanuel-Thomas was denied from 10 yards by Tom Anderson's block.
The visitors went further behind in the 52nd minute after Mark Byrne tripped Nolan and Dennis fired the spot-kick past Stuart Nelson's right hand.
Emmanuel-Thomas pulled one back with a 65th-minute penalty after Deji Oshilaja was pulled back by Anderson but Wilkinson lifted the ball over Nelson in the 72nd minute to make it 3-1.
Emmanuel-Thomas netted a second penalty after Scott Wagstaff was tripped by Laurence Maguire to put Gillingham back in it.
Wagstaff then tapped in four minutes into added time to complete the comeback for the visitors.
Report supplied by Press Association.
Match ends, Chesterfield 3, Gillingham 3.
Second Half ends, Chesterfield 3, Gillingham 3.
Goal!  Chesterfield 3, Gillingham 3. Scott Wagstaff (Gillingham) right footed shot from very close range to the bottom right corner.
Darren Oldaker (Gillingham) is shown the yellow card for a bad foul.
Connor Dimaio (Chesterfield) wins a free kick in the defensive half.
Foul by Darren Oldaker (Gillingham).
Kristian Dennis (Chesterfield) is shown the yellow card.
Corner,  Chesterfield. Conceded by Scott Wagstaff.
Corner,  Chesterfield. Conceded by Josh Pask.
Attempt missed. Adedeji Oshilaja (Gillingham) header from the centre of the box is too high.
Foul by Liam Graham (Chesterfield).
Emmanuel Osadebe (Gillingham) wins a free kick on the right wing.
Tom Anderson (Chesterfield) wins a free kick in the attacking half.
Foul by Elliott List (Gillingham).
Substitution, Chesterfield. Dion Donohue replaces Laurence Maguire because of an injury.
Delay over. They are ready to continue.
Delay in match Laurence Maguire (Chesterfield) because of an injury.
Attempt blocked. Jay O'Shea (Chesterfield) right footed shot from the left side of the box is blocked.
Jon Nolan (Chesterfield) wins a free kick in the defensive half.
Foul by Bradley Dack (Gillingham).
Substitution, Chesterfield. Connor Dimaio replaces Conor Wilkinson.
Goal!  Chesterfield 3, Gillingham 2. Jay Emmanuel-Thomas (Gillingham) converts the penalty with a left footed shot to the bottom left corner.
Penalty conceded by Laurence Maguire (Chesterfield) after a foul in the penalty area.
Penalty Gillingham. Scott Wagstaff draws a foul in the penalty area.
Goal!  Chesterfield 3, Gillingham 1. Conor Wilkinson (Chesterfield) left footed shot from the centre of the box to the bottom left corner. Assisted by Liam Graham.
Attempt missed. Gboly Ariyibi (Chesterfield) left footed shot from outside the box is too high.
Goal!  Chesterfield 2, Gillingham 1. Jay Emmanuel-Thomas (Gillingham) converts the penalty with a left footed shot to the centre of the goal.
Tom Anderson (Chesterfield) is shown the yellow card for a bad foul.
Penalty conceded by Tom Anderson (Chesterfield) after a foul in the penalty area.
Penalty Gillingham. Adedeji Oshilaja draws a foul in the penalty area.
Foul by Jay O'Shea (Chesterfield).
Scott Wagstaff (Gillingham) wins a free kick in the defensive half.
Substitution, Chesterfield. Jay O'Shea replaces Reece Mitchell.
Foul by Jon Nolan (Chesterfield).
Bradley Dack (Gillingham) wins a free kick in the attacking half.
Corner,  Chesterfield. Conceded by Josh Pask.
Substitution, Gillingham. Elliott List replaces Billy Knott.
Gboly Ariyibi (Chesterfield) wins a free kick on the right wing.
Foul by Emmanuel Osadebe (Gillingham).
Conor Wilkinson (Chesterfield) wins a free kick on the right wing.
Jay Emmanuel-Thomas scored two second-half penalties as Gillingham came from behind to shatter Chesterfield with a stoppage-time equaliser in a 3-3 draw.