The young Reds recorded a moral boosting victory over their Premiership opponents, when skipper Scott McHarrie finished off from close range in the 91st minute at Colliers Park.
Wrexham had taken the lead from the penalty spot on the hour, only for the Terriers to draw level less than 10 minutes later, all before a dramatic finale.
Youth coach Stephen Wright was happy with the way the scholars had performed throughout the afternoon.
“It had been a pretty even game, Dane Rigby made a very good save for us, while we had a couple of chances to score, but in the end, we managed to grab that late goal,” he said.
“Niall Freeman had played with the first team at Altrincham last night, plus Doug Tharme, Dan Stephens and Ben Barratt have also enjoyed playing time with senior team – which is a great for their development and makes them keen to follow in the footsteps of former team mates Leo Smith and Olly Marx.
“It was big test today, but we showed up well.”
After a morning of heavy rain, the game kicked-off with the sun starting to shine through.
Most of the action happened in the second half and the Dragons were first on the scoresheet on 58 minutes, when referee Alex Livesey spotted a handball and duly awarded a post kick.
The responsibility was handed to Niall Freeman and he made no mistake from 12 yards.
An equaliser arrived only nine minutes later when keeper Rigby had made a save, only for a clearing kick appeared to strike Town’s Matty Daly, rebounding into the Wrexham net.
Rigby was in action again pushing a Huddersfield effort onto a post and away to safety.
Then as the game clock went into added time, the Reds were awarded a free kick in an attacking position.
Freeman struck a shot that was parried by the home keeper, but the ball was loose and Scott McHarrie arrived first on the scene to ram his effort into corner of the Huddersfield net for the late winner.
The Youth team are back in action again this weekend when in change to the initial schedule, they will now play host to Brickfield Rangers at Colliers Park, with an 11.00am kick-off.
They then open their EFL Youth Alliance league season on Friday, 4 August, when Carlisle United will be the visitors to Colliers Park for a 1.00pm kick-off.
Wrexham Youth: Owen Kirkham (Dane Rigby 65), Dan Stephens, Ben Barratt, Doug Tharme, Ryan Williams (Bobby Beaumont 50), Scott McHarrie, Brandon Burrows, Matty Sargent, Niall Freeman, Steffan Bulkeley (Liam Atherton 75), Sam Pilkington (Ben Lawrence 55).
Huddersfield Town U18s: Luke Mewitt, Jordan Thomas, Sam Gibson, Oran Thompson, Jordan Eli, Dahomey Raymond, Ben Mills, Scott High, George Danaher, Micah Obiero, Ben Jackson.
Subs: Sam Kelly, Matty Daly, Saul Milovanovic, Mason O’Malley.
Referee: Alex Livesey