Lee Novak's attempt to put the home side in front after just 18 seconds from the edge of the area went wide, before Adam Clayton and Paul Dixon saw their efforts fail to hit the target.
Chances were few and far between as the first half wore on, as Seb Hines headed Grant Leadbitter's delivery harmlessly over the bar.
Oliver Norwood's header for Huddersfield on the half-hour mark from close range went just wide, before Jack Hunt and Ishmael Miller tested the two goalkeepers at either end but without success.
Neither side could create any clear-cut chances in the opening minutes of the second half, but Middlesbrough broke the deadlock on 78 minutes. Scott McDonald latched on to Sammy Ameobi's pass to slot home from close range.
However, Huddersfield refused to give up and equalised in the 86th minute, Alan Lee combining with Peter Clarke to drive home from inside the box.
Then in the first minute of injury time Daniel Ward fired in from outside the box to earn the points for the home side.