Huddersfield Town 3 Oldham Athletic 2
Graham, on loan from Sheffield Wednesday until the end of the season, bent a fine effort beyond keeper Chris Day's despairing dive on 59 minutes to complete the stunning fightback.
The Latics had been gifted a dream start when Chris Porter was left unmarked in the box early on and the former Bury striker slotted his ninth goal of the season underneath the advancing Philip Senior.
Luke Beckett netted an easy second with an unmarked near post header after Guy Branston flicked on David Eyres' free-kick on 33 minutes.
Oldham were in total command at that stage and it needed a series of fine saves from Senior to keep the score down.
But the visitors handed the Terriers a lifeline when Branston powerfully headed into his own net under pressure from Graham as the pair jostled for Danny Schofield's cross in first-half stoppage time.
Huddersfield, who looked a different team after the break, levelled on 48 mins when Pawel Abbott touched in Schofield's corner.
Graham's wonder strike then won it for the home side but Oldham fluffed a great chance to level in the fourth minute of stoppage time when Richard Butcher's powerful shot was again parried by Senior and substitute Chris Hall then blasted the rebound over the bar from close range when it seemed easier to score.