Spurs were in control in the first half after taking the lead in the opening minute, when Harry Kane's superb long pass released Son Heung-min to slot into the bottom corner.
Seven minutes later, Kane ghosted beyond Declan Rice and fired in the second and on 16 minutes Sergio Reguilon's cross was headed in by Kane to put Spurs three goals ahead.
Gareth Bale made his first-team return for Spurs with 18 minutes left and Kane hit the outside of the post as the home side looked to be heading for a comfortable victory.
But Fabian Balbuena pulled a goal back for West Ham with eight minutes to go before Davinson Sanchez turned Vladimir Coufal's cross into his own net three minutes later.
Bale shot just wide late on, before Lanzini completed a thrilling comeback with a thumping strike into the top corner from outside the penalty area.
Spurs are sixth on eight points, while West Ham climb to eighth on seven points.
Budweiser King of the Match: Harry Kane
Spurs: 26 Oct v Burnley (A)
West Ham: 24 Oct v Man City (H)