Gillingham's 15-match unbeaten League Two streak went on as Lincoln were swept aside.
Josh Gowling set the ball rolling when he headed home unmarked before Cody McDonald headed his 23rd goal this season into the top corner.
The hosts, who have now lost their last five games, were guilty of some woeful defending as Danny Hone deflected McDonald's strike in for 3-0.
Adebayo Akinfenwa rounded off the scoring when he headed home.
Gillingham will be thankful for their four-goal haul as they remain in the play-off places ahead of Accrington courtesy of goal difference.
Lincoln sit in 20th place, five points ahead of Barnet.
Lincoln City manager Steve Tilson told BBC Lincolnshire:"We needed to get the first goal to give us something to hold on to, and we started really brightly but we gave a soft goal away and it deflated everybody.
"We are a young side but when you go 1-0 down there's still a long way to go. You have to stay in the game and again we haven't done that.
"All we can do is keep encouraging, keep being positive and try and pick them up. If we deal with our own situation we haven't got to worry about the other results. We've got to try to step up to the mark and get the results that we need."
Gillingham manager Andy Hessenthaler told BBC Radio Kent:"Tremendous effort from the players and some very good goals so all in all a pleasing day for everybody.
"There was no need to be down last week, we've been on a tremendous run, people had started to write us off, even our own people, but we've got players who believe was can get promoted and you can tell that from that performance today.
"We want to go unbeaten for the next five which will be twenty games unbeaten."