Double-chasing St Helens put one hand on the engage Super League leaders shield when coach Daniel Anderson's gamble on fielding a patched-up side paid off with a 20th successive win.
Saints, who did just enough to get the win, are now two points ahead of Leeds with one round of fixtures left and need to avoid defeat by Wigan in their last match to ensure they finish top of the table for a third successive year.
Before then, they take on Hull in next Saturday's Challenge Cup final and, with that in mind, Anderson rested five members of his likely Wembley line-up and played two others, Sean Long and James Graham, for just half the game.
The only downside to the victory was the loss of prop Jason Cayless after five minutes with what looked like a recurrence of a knee injury.
Saints gave a Super League debut to 18-year-old stand-off Gary Wheeler while 20-year-old winger Dean McGilvray scored his first try for the club on his first appearance of the season and rising star Kyle Eastmond contributed 18 points.
Saints trailed for the only time when centre Paul Whatuira re-gathered possession after a fortuitous kick out of defence by Eorl Crabtree and winger Shane Elford sent former St Helens forward Stuart Jones over for the game's opening try after just two minutes.
But the visitors drew level thanks to the 163rd try of Keiron Cunningham's remarkable career and went 18-6 ahead by half-time after Long crafted tries for Willie Talau and Eastmond.
Huddersfield had the majority of the play in the first half and full-back David Hodgson got over the line without being able to ground the ball but they generally made too many handling errors to give themselves a chance of repeating their win over Saints earlier in the season.
They pulled a try back two minutes into the second half when Elford outjumped Ade Gardner and palmed the ball back for Whatuira to touch down.
Whatuira then seized on a defensive lapse to grab his second try and Chris Thorman's second goal cut the gap to just two points.
But the returning Paul Sculthorpe, who pressed his claims for a starting place at Wembley with an 80-minute display, sent second rower Chris Flannery over for Saints' fourth try on 56 minutes and McGilvray pounced on a loose ball to scoot over from 40 metres.
With Long off the field, Eastmond kicked both conversions and added two penalties before substitute Danny Kirmond scored a consolation try for the Giants.
Eastmond then had the final say, reaching out to score his second try in injury time and taking his goal tally to five from five attempts.