The Austria international created the opener for Mark Noble midway through the first half, only for Joe Lolley to level things up with his first league goal of the campaign.
Huddersfield was not level for long, though, as Arnautovic stunned the home crowd with his sixth of the season, a powerful drive beyond Jonas Lossl.
He then turned provider for Manuel Lanzini, his strike partner netting twice in five minutes to take the game away from the Terriers.
Victory lifts the Hammers into 11th place in the table, above Huddersfield, while also giving David Moyes his 200th Premier League victory.
Huddersfield had the better of a competitive start with attacking trio Rajiv van La Parra, Tom Ince and Lolley leading the charge.
However, it was West Ham which broke the deadlock just before the half hour after a mistake by Lolley from Lossl's short goal kick.
Town's attempts to play the ball out backfired dramatically as Arnautovic and Noble applied pressure, the pair dispossessing Lolley before the latter slotted home.
Making such a mistake on his first home Premier League start could have easily affected the 25 year-old, but he responded in the perfect fashion by levelling things up before the break.
A neat Huddersfield move on the right ended up at Lolley's feet, he cut inside and was given plenty of time to curl a sumptuous shot out of Adrian's reach.
David Wagner's hopes of Huddersfield maintaining momentum in the early stages of the second half were quickly extinguished by a sensational Arnautovic strike from the kick-off.
A long ball from Angelo Ogbonna was flicked onto the Austrian by Cheikhou Kouyate, he lifted it over Tommy Smith and lashed beyond Lossl to restore West Ham's lead.
With the wind in its sails, West Ham pushed for a third and came within inches as Aaron Mooy cleared off the line after Lossl had failed to deal with an Aaron Cresswell corner.
There was no respite as Lanzini put the game to bed with two strikes in quick succession.
His first came after a neat passing move that finished with Arnautovic slipping the Argentine in, Lanzini making no mistake from 15 yards.
As the clock ticked past the hour he had his second, this time profiting from Arnautovic's rapid counter attack to lift the ball beyond Lossl.
The introduction of new signing Alex Pritchard gave Huddersfield renewed hope, but there was nothing the former Norwich City man could do as Moyes celebrated his milestone win.