After a bright start which saw Rhys Browne almost open the scoring, a quickfire double from Billy Kee midway through the half left Town deflated at the break.
Looking to ensure the three points Stanley penned the visitors back for much of the second half, but a string of saves from Jonny Maddison kept it at 2-0 as Town rallied in the final quarter-of-an-hour.
Alex Fisher went close to reducing the deficit late on but the hosts held on to confirm promotion to the third tier for the first time in their history.
Pleased with the performance against Wycombe at the weekend despite the narrow 1-0 defeat, Darren Way stuck with the same starting eleven for the trip to Lancashire.
Knowing mathematical safety could be achieved with a third away win in four and a winless night for Chesterfield at Exeter, there was just one change to the matchday 18 as Connor Smith took a seat amongst the substitutes in place of loanee Corey Whelan.
In an expectant party atmosphere, the Glovers looked to subdue the sell-out home crowd and started on the front foot.
With just three minutes on the clock, intricate play with Town’s midfield eventually saw Browne thread a ball through for Jordan Green on the edge of the box, but the striker lost his footing in the process of shooting to save Stanley.
Dominant in midfield, Yeovil’s vibrant start was almost met with a goal on the 15-minute mark.
Otis Khan surged from halfway into the final third demonstrating good vision to spot the run of Browne on the right, with the winger’s shot being well-saved by Aaron Chapman as the good start continued.
Unable to get close to testing Maddison between the sticks, it took Stanley until the 23rd minute to create any moment of worry for Way’s side.
Kee’s lay-off found the unlikely figure of Jimmy Dunne 20 yards from goal, but the defender’s low drive whistled just wide.
Galvanising the Lancashire outfit, Yeovil’s impressive start was laid to ruin just three minutes later from an Accrington corner.
Sean McConville’s delivery perfectly picked out Kee at the near post whose header rippled the back of the net off the bar, before Stanley’s top scorer was back amongst the goals just moments later.
Jordan Clark’s low shot could only be parried by Maddison, allowing the hosts’ prolific frontman to grab a second of the night and stun the Green & Whites.
In an otherwise evenly contested opening 45 minutes, Yeovil ended the half as they started on the front foot but Chapman couldn’t be tested further as the league leaders edged closer to their promotion party.
Now just one half of football from confirming their spot in Sky Bet League One, John Coleman’s side restarted in determined manner and went close to a third.
The vibrant duo of Kee and Kayden Jackson caused plenty of havoc both firing just wide, before McConville drew a smart save from Maddison just past the hour-mark.
Penning Town in their own half, the tricky McConville went close to a stunning third when his audacious chip came back off the bar, with the linesman’s flag saving the visitors as Dunne tapped in on the rebound.
Becoming Yeovil’s busiest player, Maddison produced two good stops in a minute to deny Jackson and Kee once again as Marcus Barnes, Ryan Seager and Jared Bird were introduced for the Glovers in a bid to turn the tide.
In a rare second half foray forward, it was substitute Seager who called Chapman into action when he headed goalwards from Omar Sowunmi’s flick-on.
Trying to setup a nervy final 10 minutes, the deficit was almost reduced when Fisher met Tom James’ cross from the right, but the striker’s header dropped inches wide as Town rallied.
But keen to secure their historic moment, Stanley saw out the closing stages to condemn Town to defeat and book their spot in Sky Bet League One for the 2018/19 campaign.
Accrington Stanley: Chapman; Johnson, Hughes, Dunne, Donacien; Brown, Conneely, Clark, McConville; Jackson, Kee.
Bookings: McConville 33′
Subs not used: Maxted, Richards-Everton, Nolan, Zanzala, Williams, Sousa, Rodgers.
Yeovil Town: Maddison; James, Sowunmi, Donnellan, Dickson; Browne, Wing, Gobern (Bird 71′), Khan (Barnes 50′); Green (Seager 66′), Fisher.
Bookings:
Subs not used: Phillips, Mugabi, C. Smith, Santos.