The in-form striker netted an equaliser for Rovers to take a share of the spoils.
The Gills - sitting pretty in the League One promotion race - had gone 2-0 up via goals from Rory Donnelly (9, 47).
Cameron Stewart grabbed a lifeline with 15 minutes to go, before Wiliams popped up with the equaliser.
Rovers boss Darren Ferguson said: “I’m disappointed because we haven’t won three games on the bounce in the league this season and that was the challenge today.
“It’s a really disappointing result. I don’t know how we’ve not won the game to be honest. We were completely dominant.
“They had two shots on goal in the first half. They scored with one and hit the bar with the other.
“We had two great chances at 2-2.”