Two David Solomona tries gave the home side an interval lead, but he turned villain by being sin-binned.
Semi Tadulala also crossed for the Wildcats while Chris Thorman scored a try and three goals for the Giants.
Thorman also helped set up Steve Snitch to score against his old team before Torrens dived over to score at the end.
Wakefield coach Tony Smith
"I am proud of my guys, I felt we were the best team throughout. It just shows you can lose a game in the last minute. "When we were down to 12 men the momentum of the game swung their way. We hardly got over the halfway line.
"I am gracious in defeat, sometimes it is just not meant to be."
Wakefield: Halpenny, White, Demetriou, Henderson, Tadulala, Jeffries, March, Griffin, Betham, MacGillivray, Solomona, J. Field, Applegarth.
Replacements: Korkidas, Elima, Wrench, Saxton.
Huddersfield: Reilly, Aspinwall, Evans, Torrens, Gardner, Thorman, Paul, Crabtree, Drew, Snitch, Nero, Jones, Wild.
Replacements: Jackson, March, Smith, McDonald.
Referee: S Ganson (St Helens).