Neilson picked up Warren Cummings' long ball on the edge of the Stanley area after 67 minutes and fired home the crucial strike to send 631 visiting fans mad.
It had looked like a goal would evade the high-flying visitors as they hit the woodwork twice after a nervous first half where only keeper Scott Shearer's heroics kept them level. The stopper denied Stanley's young debutant Marcus Carver and home striker Padraig Amond before keeping out Michael Liddle's header as mid-table Stanley ran the show early on.
Crawley steadily found their feet as news filtered through that promotion rivals Southend had taken the lead against Macclesfield, and Gary Alexander went close. At the other end, Amond's header was cleared off the line just before the break.
After the interval, however, it was all Crawley. Alexander wasted a good chance, home keeper Ian Dunbavin got a hand to John Akinde's effort, Kyle McFadzean skimmed the crossbar with a header and Dunbavin turned Akinde's fizzing strike onto the bar.
But after a long period of pressure Crawley finally broke through courtesy of Neilson and, having survived a late Stanley barrage, the Red Devils can look forward to third-tier football next season.