Jack Muldoon's injury time winner brought a classic encounter to an end as Town picked up all three points in a dramtic goal fest at Proact Stadium.
Jon Stead had given Town an early lead, but goals from Tom Denton and Liam Mandeville soon changed that, with George Thomson levelling before the break.
Stead's second, a delightfully placed header, looked to have won it for Town, only for substitute Scott Boden to poke home in the 82nd minute, but that wasn't the last of the drama.
Deep into injury time Jack Muldoon got to Jack Diamond's cross before anyone else to secure a memorable win away from home.
Simon Weaver reverted to the side that beat Eastleigh at The CNG Stadium, with Ryan Fallowfield one of seven changes, the full back coming through a late fitness test to start at right back.
Will Smith, Warren Burrell, Thomson and Lloyd Kerry all remained in the side that secured extra time victory at AFC Fylde on Saturday.
It took nine minutes for Town to take the lead, Stead heading home his first goal of the calendar year after Burrell had raced forward from left back and delivered an excellent cross onto the head of his teammate.
Denton almost levelled three minutes later, but found James Belshaw in inspired form to tip the frontman's close range header over the bar.
The hosts continued to apply pressure and got their reward in the 26th minute as Denton converted Jordan Cropper's low cross at the back post, despite Fallowfield's best efforts on the line.
Three minutes later and the contest had been turned on it's head when Nathan Tyson's shot fell to Mandeville who was quickest of anyone to react and poke past Belshaw.
The Spireites' lead lasted just five minutes though as Thomson levelled the scores, turning home Jack Diamond's parried effort with both Stead and Muldoon involved in the build up.
It was an end to end encounter at The Proact, with Burrell unfortunate not to have put his side ahead after seeing his header from Thomson's corner cleared from the line before the break.
Nine minutes after the restart Diamond thought he had put Town ahead for the second time after cutting in and firing past Jalal, only for play to be brought back and free kick awarded to Chesterfield for an earlier incident.
There was no stopping Town taking the lead on the hour mark though as Stead claimed his second of the afternoon, sending a looping header from Diamond's cross over the head of the Spireites stopper.
A fine piece of Burrell defending prevented Tyson levelling in the 73rd minute as Town's Vice Captain slid in at the final second to deny the striker, but it was Tyson's replacement Boden who would claim the equaliser eight minutes from time.
A deep delivery from the right was headed back across goal by Denton at the far post, leaving Boden the job of poking in from a yard.
Just as it looked like the points would be shared, up popped Saturday's hero Muldoon to convert Diamond's cross and send Town home with a memorable victrory.
Harrogate Town: Belshaw, Fallowfield, Falkingham, Burrell, Thomson, Stead, Kerry, Muldoon, Hall, W Smith, Diamond
Subs not used: G Smith, Cracknell, Kiernan, Bradley, Harratt
Goals: Stead 9, 60, Thomson 34, Muldoon 90+2
Booked: Smith, Fallowfield
Chesterfield: Jalal, Buchanan, Yarney (Hutchinson 66), Evans, Weston, Mandeville (Fondop 66), Tyson (Boden 78), Smith, Hollis, Denton, Cropper
Subs not used: Fitzsimons, Weir
Goals: Denton 26, Mandeville 29, Boden 82
Referee: S Barrott
Attendance: 2912 (138 away)