Nathan Broadhead came off the bench to head home a stoppage-time winner and send Alex Neil’s side back into the League One play-off places.
The striker had missed the team’s last three matches with a hamstring injury but made the difference against a compact Gills defence.
Sunderland now have six games remaining as they try to secure a play-off place.
Our chief SAFC writer Phil Smith has delivered his verdict on how each Black Cats player fared at the Stadium of Light:
A message from the Football Clubs Editor
Our aim is to provide you with the best, most up-to-date and most informative Sunderland AFC coverage 365 days a year.
This depth of coverage costs, so to help us maintain the high-quality reporting that you are used to, please consider taking out a subscription to our new sports-only package here.
Your support is much appreciated. Richard Mennear, Football Clubs Editor

5. Dennis Cirkin - 6
Defensively solid but didn’t quite have the attacking threat that we have seen from him in the last couple of games. 6 Photo: JPI Media

6. Corry Evans - 5
Protected his side from the counter well enough. Missed one glorious chance with ten minutes to play that could have proved costly. Steady on the ball without being particularly incisive. 5 Photo: JPI Media

7. Luke O'Nien - 5
Almost scored in the first half with an excellent, inventive effort that struck the crossbar but struggled to make an impact in possession otherwise. Plenty of industry off the ball. 5 Photo: JPI Media

8. Patrick Roberts - 6
Started where he left off at Lincoln, a constant threat as he drove in from the right flank. A little less influential through most of the second half as Gillingham got to grips with his play. 6 Photo: FRANK REID PHOTOGRAPHER 2022

