Marvin Johnson opened the scoring for Neil Warnock’s side before goals from Carel Eiting and Fraizer Campbell put the hosts 2-1 up.
Boro looked like they would take a point when Britt Assombalonga converted a late penalty but there was still time for Josh Koroma to score a winner.
Our Middlesbrough writer Joe Nicholson has dished out his marks following the match – scroll down and flick through the pages of our picture gallery to see them:
1. Marcus Bettinelli - 5
Beaten three times from open play. Got a hand to Huddersfield’s first goal but couldn’t keep it out. 5 Photo: Alex Pantling
2. Anfernee Dijksteel - 5
Spent most of the match inside his own half as Huddersfield dominated possession. Allowed Koroma to cut inside for Huddersfield’s third. 5 Photo: Getty Images
3. Paddy McNair - 6
Deliveries from set-pieces were erratic. Was the closest player to Eiting when Huddersfield equalised. 6 Photo: Alex Pantling
4. Dael Fry - 7
Made some important blocks and was commanding in the air in Boro’s backline. Allowed Campbell to cut inside for Huddersfield’s second goal. 7 Photo: PA