The forward took his tally for the season to nine when he turned home Jake Hessenthaler's corner as the hosts sprung a surprise on Kenny Jackett's men.
Wolves, who are now winless in four away league matches, missed several presentable chances as they stayed second, three points behind leaders Brentford.
Goalkeeper Wayne Hennessey, who has been linked with a move away from Molineux, requested not to play on Friday, with Jackett handing Aaron McCarey his debut for the club.
But it was Gillingham keeper Stuart Nelson who was called into action first, keeping out Kevin McDonald's powerful half-volley.
McCarey was equally alert to deny McDonald after the interval, while Danny Kedwell struck the post.
James Henry also went close for the away side but it was McDonald who had the final say with a close-range strike in the dying moments.
Gillingham move up to 14th after recording their first home win since November.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.