A late strike from super sub Charlie Lee gave the Gills all three points in a match which could have gone either way at MEMS Priestfield Stadium.
With the game looking as though it would end goalless, Lee made some space for himself at the back post to convert a Jake Hessenthaler corner, with Leon Legge getting a vital touch to play it in to his path to clinch a 1-0 win.
Crawley, who themselves could have taken their lead just moments earlier, failed to force Stuart Nelson to make a save and the visitors paid for their missed opportunities as Lee clinched his second goal in as many games.
Peter Taylor made four changes to the side that lost at Bristol City with Craig Fagan, Jake Hessenthaler and Joe Pigott coming in for Amine Linganzi, Bayo Akinfenwa, Bradley Dack and Connor Smith.
Crawley enjoyed the better of the opening exchanges - Billy Clarke just unable to get the better of Elliott Hewitt inside the box, but it was the Gills who created the first meaningful opening.
On eight minutes Jake Hessenthaler delivered a teasing corner to the near post which was flicked on by Craig Fagan, and Leon Legge, who was racing in at the far post, was unable to convert from a couple of yards out.
Seven minutes later Clarke saw his first effort on goal go just wide – Jamie Proctor found Matt Tubbs on the right hand side who spotted the forward in space on the left wing, but he drilled his shot wide of Stuart Nelson’s left hand post.
In what was mainly a midfield battle in the first half both sides found it difficult to stamp authority on the game, and Pigott was next to get a glance at goal.
On the half hour mark Jake Hessenthaler whipped in a great corner from the right hand side, Legge once more was available to win a header at the back post and, on the turn, the on loan Charlton Athletic striker put his powerful shot over the cross bar.
As half time approached John Gregory’s men came in to the game a bit more, with Proctor in particular looking increasingly threatening on the left wing.
First he had an effort deflected inside the box by a recovering defender which Tubbs failed to take advantage of, before having another shot blocked by Elliott Hewitt just moments later.
Kyle McFadzean headed over from a corner, before Pigott had the final opportunity in the half when another effort cleared the bar following a fortunate ricochet from Hessenthaler on the edge of the box.
The second half began slightly nervously, but Crawley were quickly in the ascendency with Matt Tubbs having two quick fire chances go begging – the first being fired over the bar with the second well saved by Nelson.
Opposing keeper Paul Jones was then called in to action when Pigott struck across the keeper from the edge of the box, but the Crawley number one tipped it wide before Fagan headed over.
On 61 minutes skipper Adam Barrett put in a magnificent block to deny Billy Clarke an opportunity on goal, before Tubbs was thwarted by Legge.
McDonald then had his first sight of goal when Fagan thread a fantastic ball through two defenders to find the striker.
Cody cut inside but his left foot effort lacked power, prior to Weston missing the target with a right foot shot.
It was then Proctor’s turn to miss the target prior to the introduction of Akinfenwa who didn’t take long to create an opening.
With just ten minutes left to play he flicked on a long kick from Nelson, and within a flash McDonald was on the end of it.
He forced a good save by Jones before Steven Gregory tracked back with pace to deflect Andy Drury’s effort for a corner.
The game came to life in the last few minutes with Jake Hessenthaler clearing off the line, before Billy Clarke somehow failed to find the net when a free header was put wide with the goal seemingly at his mercy.
He would pay for that missed chance as within two minutes Lee, who had come on to replace Fagan just a few minutes prior, snuck in at the back post to guide the ball beyond Jones from just a few yards to spark huge celebrations in the Rainham End as full time approached.
It was Charlie's second goal in as many substitute appearances, having also scored last week away at Bristol City.
Moments after and Adam Birchall got an opportunity to get a few minutes under his belt; the striker met by a great reception from the supporters.
Crawley did their best to test Nelson in the dying stages, but Gills refused to let up in their defensive efforts and held on to secure victory for the first time in four outings.
Gills: Nelson, Hewitt, Martin, Barrett, Legge, Fagan (Lee 81), Hessenthaler, Gregory, Weston, McDonald (Birchall 90), Pigott (Akinfenwa 72)
Unused subs: Baxter, Davies, Borrowdale, Dack
Crawley: Jones, Sadler, McFadzean, Clarke, Drury, Walsh, Proctor (Fallon 73), Bulman, Tubbs, Jones (Kaikai 89), Connolly.
Unused subs: Connolly, Torres, Boateng, Maddison, Dicker
Referee: Mr D Whitestone