Wakefield came from 14-6 down to win 35-14 and ruin Paul Anderson's first match in charge of the Giants.
The Wildcats scored 29 unanswered points in the second half to claim their first win in five Stobart Super League matches, whilst the Giants have now won just once in nine games.
Anderson was fast-tracked into the role of head coach following the sacking of Nathan Brown but he was unable to halt the rotten run that has seen them drop from the Super League summit to a precarious seventh.
The former Great Britain forward had rung the changes, handing the captaincy to Luke Robinson and recalling five players after the heavy Challenge Cup defeat by Warrington.
The re-shuffle looked to have had the desired effect as Huddersfield established an eight-point lead six minutes into the second half
But the Wildcats struck back and exposed their opponents' fragile confidence by running in four tries in the last 18 minutes.
The Giants enjoyed all the early pressure but the Wildcats demonstrated some tough defence, and It took a mistake for the home side to open the scoring when full-back Scott Grix seized on a dropped pass by Tim Smith and the supporting Luke George was able to sprint to the line.
Danny Brough's conversion attempt rebounded off an upright and the visitors drew level on 24 minutes when Cockayne raced onto Smith's kick to score his 11th try of the season and Paul Sykes' goal edged the Wildcats in front
Wakefield held onto their lead until the last minute of the first half, but they were undone by a miscued kick from Brough, which allowed Leroy Cudjoe to get George over for his second try of the match.
Brough again failed with the conversion but the Giants did manage to add a third try early in the second half when replacement hooker Tommy Lee, fed Eorl Crabtree.
The conversion was to be the last time the Giants would register.
Wakefield got back into the game when Smith's kick fooled the Giants defence and Collis was on hand to claim the touchdown and they retook the lead on 62 minutes when Brough went to intercept a pass and gave Lee Smith a clear run-in for his first try for the club.
And the result was soon put beyond doubt, as two tries in the space of three minutes from Mathers and Tim Smith gave the Wildcats a 28-14 lead.
Kirmond piled on the agony in the closing stages with the Wildcats' sixth try before Sykesadded insult to injury by nailing a drop goal.