FA Cup Review: Yeovil set up Man United clash, Tranmere to face Swansea
Gary Johnson's side, who were held 1-1 on the road at League Two Stanley earlier this month, left it late at Huish Park with two goals in the final six minutes of the second-round replay.
Goals from Simon Gillett and substitute Kieffer Moore handed the third-tier strugglers a money-spinning showdown with the 11-time Cup winners.
The financial reward for a televised third-round meeting with Louis van Gaal's Premier League side is substantial and could help to transform Yeovil's fortunes, with Johnson's men sitting 21st in League One.
Relegation-threatened Tranmere Rovers also secured a home tie against top-flight opposition with a come-from-behind 2-1 victory against Oxford United.
Micky Adams' charges, 22nd in League Two, will host Swansea City next month as Kayode Odejayi and Max Power struck to cancel out Alfie Potter's 29th-minute opener.
Rochdale were given a scare by non-League Aldershot at Spotland before a late flurry of goals sealed a 4-1 success, with Matt Done grabbing a hat-trick.
Dan Fitchett equalised in the 73rd minute to wipe out Done's first-half opener, but the hosts then seized control of the match with three goals in the final 15 minutes.
Former Aldershot man Peter Vincenti restored the hosts' lead before Done's double earned him the match ball and set up a home tie versus Nottingham Forest.
Chester were another Conference side to see their Cup journey ended on Tuesday as Barnsley ran out 3-0 winners, with former Bayern Munich youngster Dale Jennings netting a second-half double.
Awaiting Barnsley in the next round is Middlesbrough, while Luton Town's 1-0 triumph over Bury saw them through to face Cambridge United, who won 1-0 at Mansfield Town.