Wanderers looked to be taking their relegation scrap to the final day but Dele Adebola's header levelled matters in the 89th minute before Alan Judge's dramatic stoppage-time winner.
The goal sent the visiting supporters into delirium as the Magpies moved up to sixth place ahead of Stevenage's trip to Sheffield United in Saturday's evening kick-off, while the home faithful were left in despair and facing a return to the fourth tier.
Wycombe went ahead after just 40 seconds as Matt Bloomfield cut inside before deceiving Magpies goalkeeper Stuart Nelson. But the visitors hit back in the third minute when Kieron Freeman's cut back reached Daniel Bogdanovic, who was on hand to find the bottom corner.
Grant Basey then restored the Chairboys' lead with a penalty after Damion Stewart fouled Stuart Beavon just inside the area but Judge's thunderous strike squared things up again before half-time
Beavon looked to have given the hosts the points when he rounded off a great move in the 68th minute. But Adebola came to his side's rescue by nodding home Mike Edwards' flick-on before Judge's winner in the third minute of injury time.