The visitors looked to have the London derby sewn up on the hour mark after a brace from Harry Kane and a Christian Eriksen strike had handed them a three-goal lead, but West Ham launched a late fightback in the final half-hour.
Cheikhou Kouyate then set up a grandstand finish with a second goal in the 87th minute, but Spurs held out for a club record-equalling fifth consecutive Premier League away win.
Slaven Bilic opted to drop Andy Carroll in order to play Hernandez through the middle, and the Mexican came close to scoring his first ever goal against Spurs with a dipping strike from range which landed on the roof of the net.
It was the Hammers who were looking most likely in the opening exchanges, with Marko Arnautovic a particular threat down the left flank as Aurier - making his first Premier League start - was caught out of position.
Aurier did produce a last-gasp sliding challenge to dispossess the Austrian in the penalty area, though, denying West Ham the opening goal at the end of a quick counter-attack.
Bilic's plans to maximise the effect of Hernandez through the middle took a blow before the half-hour mark when Michail Antonio limped off with a groin injury, being replaced by Carroll to force Hernandez out to the right flank.
Carroll made a quick impact, but not in the way Bilic would have expected as the sub gifted possession to Eriksen, who began the move which provided the opening goal.
The Dane's through-ball released Dele Alli down the right flank and his subsequent cross picked out Kane, who applied the finishing touch for his first ever away goal against the Hammers.
It was a goal which came against the run of play, but Spurs and Kane had a second just three minutes later when he rolled a rebound into the empty empty after Joe Hart had denied Alli.
It was Kane's 11th goal in his last five Premier League away games and 25th of the calendar year in the top flight, and he almost completed a quickfire hat-trick three minutes later when his low curling effort skimmed narrowly wide.
The England striker was even closer to another Premier League treble on the hour mark when his free kick struck the foot of the post, but Spurs kept the ball alive and Eriksen provided their third seconds later with a controlled finish into the bottom corner.
Kane hit the other upright just three minutes later as Spurs went in search of another quickfire double, with his low drive from a tight angle thumping against the near post.
West Ham did give themselves a glimmer of hope with 25 minutes remaining when Hernandez broke his duck against Spurs at the ninth attempt with a typically predatory finish that saw him nod home from close range after Jose Fonte had flicked the initial corner onto the back post.
Hopes of a memorable comeback against their biggest Premier League rivals grew even further when Spurs were reduced to 10 men, with Aurier picking up a second yellow card in the space of six minutes with a rash and needless challenge from behind on Carroll.
Hernandez drew a couple of saves from Hugo Lloris in his search for another goal back, but it was Kouyate who eventually pulled the hosts to within one with a powerful header after being picked out by Arthur Masuaku's cross.
As the pressure rose in the closing stages so did the temperature on the field, and injury time was mainly taken up by minor skirmishes between players as Spurs managed to hold on for three valuable points.
The win sees Tottenham begin the campaign with three consecutive away victories for the first time in the Premier League era, ending a run of back-to-back defeats at the home of their London rivals in the process.