Huddersfield (6) 6
Tries: Robinson Goals: Brough
Wigan (8) 20
Tries: O'Loughlin, Charnley, Hoffman Goals: Charnley 4
Josh Charnley made it three tries in two games for the Warriors.
Josh Charnley scored a stunning try and proved up to the job as stand-in kicker as champions Wigan went top of Super League for the first time this season.
Skipper Sean O'Loughlin scored Wigan's first try inside three minutes, only for it to be cancelled out by old boy Luke Robinson's response on 22 minutes.
But Charnley kicked Wigan into an 8-6 half-time lead, then produced a great try three minutes after the restart.
Ryan Hoffman's late try, sandwiched by two Charnley kicks, sealed victory.
Charnley was only on kicking duty as Wigan are not only still without last season's record-breaking points machine Pat Richards, but also had Paul Deacon out injured and Sam Tomkins on a one-game ban.
But the young Chorley lad proved the hero as Wigan edged a bruising, defence-dominated clash at the Galpharm Stadium to leapfrog Huddersfield into pole position.
The 19-year-old winger, last weekend's last-gasp matchwinner against Hull, only got one try this week.
But Charnley made the others for skipper O'Loughlin and Hoffman, while kicking four goals as Mick Maguire's men maintained their unbeaten record.
Wigan were without eight members of their senior squad, including the suspended Tomkins brothers. And Nathan Brown's men did have chances to win it, having two tries tries chalked off by the video referee, who also disallowed a Wigan score.
But they were continually thwarted by the Warriors' magnificent defence. And it inflicted on the Giants their first home defeat of the season - their first at home, in fact, since Wigan triumphed at the Galpharm last May.
It was up there with one of the best performances defensively I've been involved with
Wigan coach Michael Maguire
After scoring nine tries against Bradford five days earlier, they could manage just one against the best defence in the league.
The consolation for the Giants, who gave a debut to ex-Bradford centre Joe Wardle, was the performance of Robinson on his comeback from shoulder surgery.
Robinson went on for hooker Shaun Lunt midway through the first half and scored with his first touch, profiting from a kind ricochet after full-back Amos Roberts allowed one of Danny Brough's towering kicks to bounce.
By then, Wigan had taken an early lead, when the talented Charnley collected Thomas Leuluai's high kick to the corner and found the supporting O'Loughlin.
Charnley kicked the conversion - his first goal for the club - before edging his side back in front with a penalty just before half-time.
That became 12-6 within three minutes of the restart when Charnley outsprinted Huddersfield winger Jamie Simpson to take O'Loughlin's beautifully-judged up and under in full flight before diving over for a stunning try.
With the game still in the balance, as the home side piled on the pressure, Scott Grix was held up over the line and Robinson and Brough both went agonisingly close.
But the decisive moment came on 73 minutes when Charnley kept his nerve to put Wigan two scores in front with a penalty.
And the winger capped a tremendous individual display when he broke free to send Hoffman over for a third try just before the end, Charnley adding the extras.
Huddersfield coach Nathan Brown:
"I don't think there was a great deal in it but they are obviously very good defensively.
"We had two real good chances to score in the first half and, when you're playing Wigan, you've got to take them because generally you don't get to create too many.
"There were another four or five times when, against a lesser defence, we would have scored tries.
Wigan coach Michael Maguire:
"It was up there with one of the best performances defensively I've been involved with.
"The way the boys stood up when they needed and put their hands up on certain plays was very pleasing.
"Josh Charnley's a talent. I always knew at some stage he was going to pop his head up and he is taking his opportunities. It's credit to him. He keeps working hard.
"We had a bit of a shoot-out in the week and Josh put his hand up. It was good to see him kick well tonight."
Huddersfield: Grix; Simpson, Cudjoe, Wardle, Hodgson; Brown, Brough; Mason, Lunt, Griffin, Gilmour, Fa'alogo, O'Donnell.
Replacements: Robinson, Faiumu, Crabtree, Horne.
Wigan: Roberts; Goulding, Marsh, Carmont, Charnley; O'Loughlin, Leuluai; Prescott, McIlorum, Coley, Hansen, Hoffman, Farrell.
Replacements: Lima, Mossop, Tuson, Mellor.
Referee: Ben Thaler (Wakefield).