Chesterfield were hit by a late sucker-punch at the Proact to lose a second home game in succession.
The Spireites were doing all the late pressing with the game locked at 1-1, before a mistake and a quick counter attack allowed Lewis Young to grab a stoppage time winner for Crawley.
Town slip back into the bottom two on the strength of the result, having climbed as high as 21st during the match - which they led from the 18th minute.
Louis Reed's goal was cancelled out by the impressive Karlan Grant after the interval and a draw might have been a fair result before the late drama.
Thomas Verheydt threatened early, breaking the hosts' offside trap to hare into the box, where Sid Nelson stopped the move with a perfectly timed slide tackle.
Kristian Dennis and Jak McCourt lined up a pair of efforts, both of which were blocked by Crawley defenders just outside the box.
Robbie Weir's cross to the back post brtought another shooting opportunity, this time for Josh Kay, but again there was a red shirt in the way.
Laurence Maguire was unlucky to see his well-hit shot from eight yards blocked, before an attempt finally got through and gave Town the lead.
A corner was only cleared as far as Louis Reed and he lined up a 25-yard volley that took a slight deflection to beat the despairing dive of Glenn Morris.
Crawley gave the home side a couple of scares from set-pieces, Josh Yorwerth coming close with a glancing header that crept wide.
The Spireites continued to push for a second, McCourt sending the ball high and wide from the corner of the area after good work by Josh Kay, Dennis unleashing a fierce drive that whistled past the post.
Ramsdale was called into action after a long period of inactivity late in the half, palming Karlan Grant's dipping 20-yarder round the post.
Hearts were in mouths when Weir sold his keeper short with a back pass and Grant threatened to nip in, Ramsdale doing enough before Sid Nelson cleared the danger.
And two minutes before the break Grant was foiled again, Ramsdale coming off his line to make a terrific stop and beat away the Crawley man's shot.
It was an action packed start to the second half, Kay picking up a booking for a lunge on Yorwerth, Jimmy Smith sidefooting wide from close range for Crawley and Kay then bringing a brilliant save from Morris with a beautiful strike.
Crawley came close again through Verheydt thanks to some slack defending, the big striker nodding wide, before a dinked ball over the top put Smith clean through and Ramsdale made another vital stop.
Dodds had a debut goal on his mind when the ball dropped to him just inside the area, but the new boy spooned his shot over.
Having lived dangerously, defensively, since the interval, Town conceded somewhat unsurprisingly before the hour mark.
Dangerman Grant held off Nelson and no one else could get near him as he powered into the area and drilled past the helpless Ramsdale.
Having failed to learn their lesson, the Chesterfield defence again showed Grant onto his right foot and luckily this time he was unable to hit the target.
Dennis had a sniff of goal when McCourt's header looped through to him, but with a defender closing in the striker had to shoot early and Morris saved easily.
As time ticked away Chesterfield looked the fresher side and did all of the attacking in the final minutes.
But deep in injury time a loose pass from Reed put Crawley on the attack and when the ball was laid back to Lewis Young he supplied a beautiful finish to break Town hearts and win it for the visitors.
Chesterfield: Ramsdale, Weir, Whitmore, Nelson, Maguire, Reed, McCourt, Kay (Hines 70), Dodds (O'Grady 78), Mottley-Henry (Rowley 70), Dennis. Subs: Parkin, Binnom-Williams, O'Grady, Barry, Brown.
Crawley: Morris, Young, Doherty, Connelly (Lelan 78), Yorwerth, Bulman, Smith, Grant (Evina 86), Boldewijn (Tajbakhsh 89), Randall, Verheydt. Subs: Mersin, Payne, McNerney, Sanoh.
Referee: Mr Ross Joyce. Assistants: Matthew Jones, Kevin Mulraine
Goalscorers: Reed 18, Grant 57, Young 90
Yellows: Kay 47; Randall 45
Attendance: 5,159 (114 away)