The Latics had enjoyed the best of the possession and territory for the majority of the game but had failed to force visiting goalkeeper Alex Smithies into much action.
Town had seen two efforts cleared off the line in the first half, as James Vaughan and Mark Hudson had headers cleared in the nick of time by Liam Ridgewell and Martyn Waghorn respectively.
But Coady made it third-time lucky deep inside the final quarter when his cross-shot deceived everyone in the middle – not to mention goalkeeper Scott Carson – and found its way into the top corner.
There was no time for Wigan to muster a comeback, and Malky Mackay’s men look to have plenty of work to do if they are to avoid League One football next term.
Wigan, with Callum McManaman back in the side after a three-match ban, started like they really meant business.
James McClean volleyed inches wide from distance, with Waghorn narrowly failing to find the Irishman with a right-wing cross.
After finding their feet in the game, the visitors threatened when Sean Scannell crossed and Jack Robinson fired over the top.
Scannell then skinned Andrew Taylor and Wigan were indebted to Ridgewell for getting back to clear.
Nakhi Wells then cut in from the right only to shoot straight at Carson, and the visitors were nearly taking advantage of another mistake by Taylor moments later.
The left-back’s header failed to make its way to Carson, with Scannell seizing possession.
His cross for Vaughan was a good one, and the striker looked a certain scorer only for Ridgewell to get back and clear the header off the line.
McClean had a decent effort blocked for Wigan, but Town ended the half on top and Jacob Butterfield’s corner was headed goalwards by Mark Hudson, with Waghorn this time the man clearing off the line.
Wigan started the second half with a couple of handball shouts that were not given, before Marc-Antoine Fortune and Don Cowie appeared off the bench to try to make a difference.
McManaman’s cross found McClean, whose header was always too high, but apart from that the Town defence were keeping their opponents at arm’s length with relative comfort.
Vaughan was cursing his strike partner Wells for ignoring him on one Town foray only to get crowded put in the Wigan box.
Vaughan’s mood did not improve when he sent his next opportunity well wide of the mark from a decent position.
By this time Andy Delort was on for Wigan, taking over from McManaman who had taken a heavy knock moments earlier.
The Frenchman was his busy self as he tried to put himself about as best he could, and the home side briefly threatened when McClean’s corner was stabbed just wide by William Kvist.
As Wigan attempted to step up their efforts for a final assault, they were rocked by a freak goal with just eight minutes remaining.
There seemed little danger when Coady took delivery of the ball near the Huddersfield left wing. But one swing of his right foot saw the ball curl towards the far post and, incredibly, drop into the top corner with Carson left utterly helpless.