The visitors took the lead after just 13 seconds as Kieran Agard slotted home from close range for his 20th goal of the season.
Lee Frecklington and James Tavernier came close to doubling the advantage before Adebayo Akinfewa levelled things up after half an hour with his 10th of the campaign.
Myles Weston then put the hosts in front 12 minutes after the break as he latched onto Elliott Hewitt's through ball to slot home.
But on-loan forward Hitchcock, a 61st-minute sub, had only been on the pitch for eight minutes when he beat the offside trap to coolly finish from six yards to make it 2-2.
Bradley Dack capitalised on a mistake from Kari Arnason to put the Gills back in front with six minutes remaining with a brilliant chip.
However, Hitchcock equalised again barely a minute later with a neat finish and then completed his hat-trick in the third minute of stoppage time with a classy curling lob to extend the Millers' unbeaten run to 16 games.