In a quiet first half it was the visitors who had the first chance as Gills keeper Stuart Nelson just managed to gather the ball from an onrushing crowd after spilling Izak Reid's low driven shot in the 10th minute.
Gillingham responded positively but somehow failed to take the lead when skipper Adam Barrett saw both his close range shots blocked on the line after 23 minutes.
The deadlock was broken in the 36th minute as Lewis Montrose poked home the loose ball from 10 yards after the visitors failed to clear Danny Jackman's lofted free kick.
Morecambe started the second half brightly but Nelson did well to repel Gary McDonald's low drive in the 62nd minute. The equaliser came from substitute Jack Redshaw, who notched his seventh goal of the season within minutes of coming off the bench - tapping in Kevin Ellison's well-worked cross after 69 minutes.
The game looked destined to end all square but in stoppage time veteran striker Burton beautifully controlled a Matt Fish cross before turning and smashing home from eight yards.