The midfielder rescued a point for the Gills against Brighton last Tuesday and was on hand again at Priestfield, heading home the first in a victory that moves his side up to 19th.
The Whites were bidding for a fourth consecutive win as they look to seal automatic promotion but Gillingham are a tough nut to crack at home and extended their unbeaten streak to seven matches at Priestfield.
After Miller’s opener in the eighth minute, he turned provider for Mark Bentley on the half hour and three minutes later, the home side were three up as Leeds captain Richard Naylor headed into his own net.
Luciano Becchio struck back for Leeds as half-time approached and Jermaine Beckford’s 22nd goal of the season ensured a tense finale, smashing home a penalty with three minutes remaining after a Bentley foul.
But the makeshift Gills defence held out in the final minutes and ensured Leeds remain just one point ahead of Millwall in second.