The Glovers, who are 21st in the third tier, left it late to secure victory against their League Two opponents in Tuesday’s Second Round Replay.
After a tight contest, the deadlock and Stanley’s hearts were broken when Simon Gillett finished on 84 minutes to send the Huish Park faithful into dreamland.
The FA Cup
Second Round Replays
Tuesday 16 December
Winning clubs receive £27,000
As the visitors pushed for an equaliser, Yeovil sub Kieffer Moore pounced to double their advantage and seal his side’s spot in the next round four minutes from time.
11-time FA Cup winners United will now head to the West Country for the televised clash on Sunday 4 January.
Fellow League Two side Barnsley sealed a home tie with Middlesbrough next month after disposing of Chester 3-0 at The Deva Stadium.
Kane Hemmings fired them into the lead on 16 minutes, and they did not look back as a second-half double from Dale Jennings inflicted further blows to the home side.
Tranmere Rovers will meet Premier League opposition after coming from behind to defeat Oxford United at Prenton Park. Alfie Potter had given the away side the lead just before the half hour mark, but Kayode Odejayi levelled before the break and Max Power notched the winner with 15 minutes to go.
Sullay Kaikai scored the only goal as Cambridge United beat Mansfield to book a Third Round visit of Luton Town, who had Mark Cullen to thank as he notched the only goal of the game against Bury in their replay at Kenilworth Road.
Matt Done’s hat-trick ensured Rochdale will welcome Nottingham Forest to Spotland after they thumped Aldershot 4-1.
Hotshot Done put in Joe Rafferty's cross for the opener, only for the Conference side to equalise when Dan Fitchett nodded in a corner.
Former Shots striker Peter Vincenti then hooked in from six yards just two minutes later before Done finished off the tie when he scored a one-on-one and then tucked away Calvin Andrew's cut-back.