Lenell John-Lewis gave the Minstermen a fifth minute lead and despite United taking the match to the death, York wrapped it up in the 86th minute through Maz Kouhyar.
It was a gut-wrenching end to the campaign for Paul Cox’s side, who must now prepare for a 13th consecutive year in National League North.
Ahead of kick-off, Cox had opted to stick with the same shape that had defeated AFC Fylde six days earlier, with Jake Wright Jnr returning to the side in place of Ntumba Massanka.
The Pilgrims fell behind inside five minutes. United felt aggrieved that a throw-in was wrongly awarded to City after Mitch Hancox had appeared to foul Keenan Ferguson - but play continued and JOHN-LEWIS swooped from close-range after Scott Barrow's long throw had bounced kindly off Scott Garner's shins.
United struggled to make headway against an organised City rearguard but felt they should have had a penalty when Shane Byrne's cross appeared to be handled by Hancox.
Danny Elliott fired wide from a Femi Seriki throw-in, but the Minstermen continued to carry the greater threat, with Clayton Donaldson rattling the crossbar and John-Lewis firing off target.
Shiels headed off target from a Byrne corner after the break, while Elliott saw an effort deflect wide and York keeper Peter Jameson made a fine save to keep out Byrne's low free-kick with 10 minutes to play.
York sealed the deal when they picked off a United side desperately throwing bodies forward in pursuit of a late equaliser - with KOUYHAR beating Marcus Dewhurst at his near post with a promotion-clinching second goal.
York (4-3-3): Peter Jameson; Olly Dyson, Maxim Kouogun, Sam Sanders, Scott Barrow (Matty Brown 71); Mitch Hancox, Akil Wright, Paddy McLaughlin; Clayton Donaldson, Lenell John-Lewis, Maz Kouhyar. Subs (not used): Michael Woods, Kurt Willoughby, Jack McKay, Ryan Whitley (gk).
Boston (4-2-2-2): Marcus Dewhurst; Femi Seriki, Luke Shiels, Scott Garner, Keenan Ferguson; Shane Byrne, Brad Abbott (Ntumba Massanka 60); Paul Green, Connor Dimaio (Fraser Preston 83); Jake Wright Jnr (James Hanson 75), Danny Elliott. Subs (not used): Scott Duxbury, Jake Wright Snr.
Referee: Matt Corlett.
Attendance: 7,448 (853 visitors).
PIC: Oliver Atkin.