In a dramatic late twist Clarke, on as a 75th-minute replacement for Seol Ki-Hyeon, scrambled the ball home.
Gills had broken the deadlock in the 55th minute when Darius Henderson punished an error by Jody Craddock.
Kenny Miller converted a cross from Rob Edwards five minutes later but the visitors regained the lead in the 90th minute when Michael Flynn broke clear.
Gillingham boss Stan Ternent (on Leon Knight's equaliser):
"First of all there was a foul on our centre-back and then the lad has handled it.
"Sometimes you need a bit of a break to go your way, a break that makes all the difference, and things haven't been going for us lately.
"I was pleased with our performance overall in what was a scrappy game because we've scored two away goals."
Wolverhampton: Oakes, Edwards, Lescott, Craddock, Naylor, Seol (Clarke 75), Olofinjana (Cooper 68), Andrews, Cameron, Cort, Miller.
Subs Not Used: Ikeme, Newton, Bjorklund.
Goals: Miller 60, Clarke 90.
Gillingham: Banks, Nosworthy, Ashby, Cox, Southall, Smith, Flynn, Crofts (Pouton 76), Byfield, Jarvis (Spiller 90), Henderson.
Subs Not Used: Bossu, Hills, Beckwith.
Booked: Southall. Goals: Henderson 55, Flynn 90.
Ref: K Woolmer (Northamptonshire).