The Giants welcomed back Adam Clune after almost two months out, and the half-back made an immediate impact, with two try assists as Huddersfield chalked up a 12th Magic Weekend victory.
An edgy-looking Hull conceded a string of first-half penalties, allowing Flanagan to boot the Giants ahead.
Zac Woolford and Joe Greenwood spurned further gifts, knocking-on in strong attacking positions, before Cudjoe's step-and-go beat Will Pryce in a one-on-one to cross under the posts.
John Cartwright's side had mustered little attacking threat, but responded immediately when the Giants coughed up possession from the restart.
John Asiata's powerful surge to the line and super back-handed pass allowed Ese'ese to flop over for his fifth Super League try of the season, and only Flanagan's heroic tackle denied Cade Cust a certain try to preserve the slender lead.
But the game hinged on two moments of madness as a full-blooded first half boiled over on half-time.
Hull prop Sam Eseh swiftly followed Thomas Burgess to the bin for a high tackle on Matty English which sparked a mass brawl. And with the next play, they were down to 11 when Knight was sent off for smashing a shoulder into Hewitt's head.
The Black and Whites managed their numerical disadvantage well after the break, but a loose Ese-ese pass was swiftly punished when Clune's brilliant cut-out pass took out four Hull defenders and put Gagai in the right corner.
Within a few minutes, Davy Litten's brilliant offload off the floor and Martin's superb one-handed flying finish in the corner made it 12-10 heading into the final quarter.
Huddersfield dominated territory, but a combination of super Hull defence - including Cust's brilliant try-saving tackle - and Giants profligacy kept the game in the balance right the way to the final whistle.