The Shrimps produced an excellent second-half performance at Christie Park to clinch fourth spot in the club's final regular-season league game. They will face Dagenham in the play-offs.
Hunter slotted home Paul Mullin's low cross after a long clearance from goalkeeper Barry Roche caused the Shots' defence all manner of problems.
The Shots had started the game well and wasted a string of chances in the first period as Damien Spence and Marlon Jackson both missed the target when they should have done better.
Mullin went close for Morecambe with a header that was well saved by Jamie Young and Damian Spencer also flashed an effort over before Hunter netted the decisive goal.