McDonald opened the scoring for the hosts just 21 seconds into the second half, hitting an unstoppable overhead kick from the edge of the box following Jake Hessenthaler's cross.
Gills midfielder Chris Whelpdale volleyed on to the crossbar shortly after McDonald's opener, while leading scorer Danny Kedwell's header helped a Whelpdale throw-in on to the woodwork.
Romaine Sawyers levelled the game 16 minutes after the opener, converting at the second attempt after Leon Legge had blocked his first shot from James Baxendale's cross.
Then Julian Gray, who had only been on the pitch for five minutes, capitalised on a mistake from Callum Davies to volley the visitors into a 90th-minute lead.
However, the Gills struck back immediately, as McDonald slotted home from close range after a darting run.
The striker almost won the game in the third minute of stoppage time, but Saddlers goalkeeper Richard O'Donnell brilliantly saved with his feet.