The big defender, wearing a dressing on a head wound and a shirt with no number, rose high above the Rovers defence to glance home Shane Ferguson's right-wing corner and send 1,200 travelling fans into party mood.
Millwall looked to have blown their chance when Billy Bodin made it 3-3 with a superb 30-yard free kick on 74 minutes.
An action-packed first half saw the visitors take a fifth-minute lead when Lee Gregory hooked in a close-range volley after a left-wing corner had been headed down.
Millwall doubled their advantage 20 minutes later, Steve Morrison heading on another corner for skipper Tony Craig to tap home from only a yard out.
Rovers hit back when Jermaine Easter rifled home on 33 minutes after Bodin's deflected shot came back off the inside of a post, but two minutes later the impressive Morrison produced a perfect cross from the right for Gregory to bundle in his second.
A right-footed rocket from Chris Lines after more good work from Bodin brought Rovers back to within a goal of the visitors on 42 minutes before the late drama.
Match report supplied by the Press Association.
Match ends, Bristol Rovers 3, Millwall 4.
Second Half ends, Bristol Rovers 3, Millwall 4.
Attempt missed. Steve Morison (Millwall) right footed shot from outside the box is high and wide to the left.
Steve Morison (Millwall) is shown the yellow card.
Foul by Steve Morison (Millwall).
Byron Moore (Bristol Rovers) wins a free kick in the attacking half.
Attempt blocked. Chris Lines (Bristol Rovers) right footed shot from outside the box is blocked.
Attempt blocked. Stuart Sinclair (Bristol Rovers) right footed shot from outside the box is blocked.
Fred Onyedinma (Millwall) wins a free kick in the attacking half.
Foul by Stuart Sinclair (Bristol Rovers).
Foul by Shaun Williams (Millwall).
Byron Moore (Bristol Rovers) wins a free kick in the defensive half.
Foul by Steve Morison (Millwall).
Daniel Leadbitter (Bristol Rovers) wins a free kick on the left wing.
Aiden O'Brien (Millwall) wins a free kick in the defensive half.
Foul by Byron Moore (Bristol Rovers).
Substitution, Millwall. Jake Cooper replaces Shane Ferguson.
Chris Lines (Bristol Rovers) wins a free kick on the left wing.
Foul by Aiden O'Brien (Millwall).
Attempt saved. Steve Morison (Millwall) left footed shot from a difficult angle on the left is saved in the bottom left corner.
Substitution, Bristol Rovers. Ryan Broom replaces Ellis Harrison.
Goal!  Bristol Rovers 3, Millwall 4. Shaun Hutchinson (Millwall) header from the centre of the box to the top left corner.
Corner,  Millwall. Conceded by Lee Brown.
Hand ball by Shaun Williams (Millwall).
Substitution, Bristol Rovers. Luke James replaces Jermaine Easter.
Attempt saved. Shaun Cummings (Millwall) right footed shot from outside the box is saved in the top centre of the goal.
Attempt saved. Jermaine Easter (Bristol Rovers) right footed shot from outside the box is saved in the bottom left corner.
Foul by Jermaine Easter (Bristol Rovers).
Shaun Williams (Millwall) wins a free kick in the attacking half.
Goal!  Bristol Rovers 3, Millwall 3. Billy Bodin (Bristol Rovers) from a free kick with a left footed shot to the top right corner.
Byron Moore (Bristol Rovers) wins a free kick in the defensive half.
Foul by Shaun Williams (Millwall).
Attempt blocked. Lee Brown (Bristol Rovers) right footed shot from outside the box is blocked.
Billy Bodin (Bristol Rovers) wins a free kick in the defensive half.
Foul by Shaun Williams (Millwall).
Attempt missed. Ellis Harrison (Bristol Rovers) header from the centre of the box misses to the right.
Corner,  Bristol Rovers. Conceded by Shaun Cummings.
Substitution, Millwall. Aiden O'Brien replaces Lee Gregory.
Stuart Sinclair (Bristol Rovers) wins a free kick in the attacking half.
Foul by Lee Gregory (Millwall).
Shaun Hutchinson headed an 85th-minute winner as Millwall grabbed the final play-off place in League One with a thrilling win at Bristol Rovers.