The 23-year-old striker came off the bench to bag only his second goal for the East Anglian side to see-off the Gills at Priestfield.
But it was Gillingham who nearly opened the scoring after just five minutes when Jack Payne latched onto Luke Rooney’s through ball only to slide his shot wide.
Both teams continued with plenty of vigour but there was a distinct lack of inspiration until the introduction of McDonald for Chris Martin after 62 minutes.
And just four minutes later McDonald turned inside the Gills box and unleashed a shot that was deflected past Alan Julian’s outstretched arm and into the net.
The Gills had a chance to equalise eight minutes from time but midfielder Adam Miller’s fierce drive flashed inches wide and leave the Canaries to comfortably see out the remainder of the match.