A late wonder strike from Ryan Seager saw the Shrimps suffer defeat at Huish Park.
The Glovers’ substitute beat Mark Halstead from 25 yards with a superb dipping effort to leave the Shrimps empty handed in a game they controlled for long periods.
Morecambe started well with Ritchie Sutton's looping header grazing the woodwork from a Jordan Cranston corner and Rhys Oates sending an overhead kick over from close range after another Shrimps corner caused problems.
Morecambe took the lead in the 22nd minute with Richie Bennett’s third goal for the club since his January move from Carlisle.
Aaron Collins provided the assist when he did well to chase down a loose ball down the right hand side before cutting inside and crossing into the six yard box for the unmarked Bennett to head home from close range.
Yeovil hit back with Courtney Duffus firing wide of the left hand post after a good run in the box before Shrimps’ keeper Mark Halstead pulled off a fine save to palm away Matt Worthington’s effort from 12 yards after being well found by Alex Dobre.
Morecambe pressed for a second in the early stages of the second half with Piero Mingoia denied by a superb Baxter save just 27 seconds after the restart before Yeovil turned the game with two goals in three minutes from Tristan Abrahams.
The first came following some good work by Alex Dobre who cut side from the left before teeing up Abrahams who provided a neat finish to fire under Halstead from 12 yards out.
The goal seemed to hit the Shrimps’ shape and the home side went ahead on 62 minutes when Abrahams was found free in the box to finish past Halstead again from 12 yards.
Morecambe hit back with Steven Old bringing them level seven minutes from time with a neat finish from Liam Mandeville’s cross and the game looked set for a draw.
But then with time running out Seager collected the ball 25 yards from goal and after what looked a handball in the build up, let fly with a stunning effort to give Yeovil the vital three points.
Yeovil: Baxter, Browne, Showunmi, Graffiti, James, Abrahams, Santos, Worthington (rep Pattison 53), Dobre, Fisher (rep Zoko 56), Duffus (rep Seager 80). Subs not used: Nelson, Mugabi, Ojo, Arnold.
Morecambe: Halstead, Mills, Old, Sutton, Conlan, Kenyon (rep Mendes-Gomes 80), Cranston, Mingoia, Collins, Oates (rep Ellison 69), Bennett (rep Mandeville 68). Subs not used: Roche, Dalby, McKay, Hedley.
Ref: A Coggins.