Boreham Wood will travel to either Worthing or Sutton United after making it through to the third round of the FA Trophy for the first time in 11 years.
The Wood were late winners at Meadow Park and were made to work for their 2-1 victory over Alfreton Town on Saturday, before Kenny Davis' injury-time strike finally saw them through.
They had led through Angelo Balanta's individual effort 10 minutes before the break, but were pegged back from Niall Heaton's second-half header from a corner.
But Davis would have the last laugh when he finished off Anthony Jeffrey's cross from close range to seal Wood's progression.
Early on, Wood turned on the pressure with Femi Ilesanmi and Jeffrey both looking dangerous.
Morgan Ferrier missed a 13th-minute volley from inside the Alfreton box, while Jeffrey did likewise when played through one-on-one as the hosts ramped up the pressure.
Manager Luke Garrard would have been concerned with the profligacy of his side as Jeffrey and Ferrier squandered further efforts before the break, the latter pulling out a fantastic save from visiting goalkeeper Fabian Spiess.
But the pressure finally told, as Balanta grabbed the opener in style. Having picked up the ball from a fortunate ricochet, he waltzed through the defence and fired past Spiess with aplomb.
Substitute Matt Paine nearly added a second shortly after half-time but his header evaded the Alfreton bar, but the visitors, who had offered precious little to earn it, got their equaliser 12 minutes into the second period.
A spell of pressure began with Davis conceding a free-kick just inside the Wood half, and after the ball was cleared behind Heaton nodded beyond Grant Smith to level.
Buoyed and looking for a second goal, Alfreton almost turned the game on its head when Smith had to be alert to tip over a volley inside the area shortly after the equaliser.
Balanta and Paine turned the tide back in the direction of the hosts as their domination slowly resumed, and they finally found the breakthrough in added time, when Jeffrey's mazy run down the left ended with the tricky winger squaring the ball low into the six-yard box.
The ball was turned home by Davis sparking wild celebrations, as the Wood realised his late goal would prove sufficient for their progression.