A first-half goal from midfielder Curtis Weston earned Gillingham only their third away win of the season at Christie Park.
In a game played in awful conditions Weston scored his second goal of the season on 18 minutes to help his side record the double over Morecambe, after a 5-0 home win earlier in the season.
The visitors took a deserved lead in at half-time after showing the sharper play in a scrappy first half.
They should have taken the lead after only two minutes when Gary Mulligan almost took advantage of Morecambe's failure to clear the ball with a shot that flew wide of the right-hand post.
Simeon Jackson then had a great chance for the opener after nine minutes when he broke clear to race in on goal, before Dave Artell's superb tackle forced the striker to mishit his shot wide.
Mulligan was then denied by the crossbar after a neat volley from a right-wing cross, but the Gills were not to be denied for long as they took a deserved lead.
After Neil Wainwright slipped going forward Dennis Oli ran at the Morecambe defence and played in Mulligan. His shot hit the foot of the right-hand post and Oli's follow-up shot was blocked before Weston scored from 12 yards out.
Morecambe hit back with Fraser McLachlan blazing an effort over before Rene Howe shot just wide from the edge of the area.
With the wind behind them Morecambe dominated possession in the second half, but only forced Simon Royce into one crucial save when a late effort from Craig Stanley looked set for the top left-hand corner.
Royce was called into action to make saves from Howe, Artell and the returning Matty Blinkhorn, but the Shrimps failed to turn pressure into goals.
Weston could have had the final word and added a second right at the death, but Garry Hunter sprinted back to clear off the line.