Jose Mourinho's men were in complete control from the moment Son Heung-min opened the scoring inside a minute, with Harry Kane's quickfire double seemingly confirming the victory after only 16 minutes.
However, Fabian Balbuena's header and a Davinson Sanchez own goal set up a nervy finish, and Lanzini's incredible strike secured a point for the visitor at the death, putting a huge dampener on Gareth Bale's Spurs return.
Back in the dugout for the first time since testing positive for coronavirus in late September, West Ham boss David Moyes would have hoped to see his team build on the two convincing Premier League wins earned in his absence.
Instead, the Hammers lasted just 45 seconds before conceding, Kane dropping into midfield before and clipping the ball over the top for Son, who cut inside Balbuena with ease to dispatch a low shot into the far corner.
Things went from bad to worse shortly after, as Kane nutmegged Declan Rice at the edge of the box before sending a shot through the legs of Angelo Ogbonna and beyond a helpless Lukasz Fabianski.
While the visitor had a couple of promising moments in the aftermath of that second goal through the industrious Michail Antonio, they simply could not keep Spurs at bay at the other end.
Consequently, they were 3-0 down after 16 minutes, Kane grabbing his second with a powerful header from Sergio Reguilon's cross to the back post.
To its credit, West Ham attempted to produce a positive response to an opening quarter of an hour that had all but ended its hopes of taking anything from the game, but any potential openings it worked were often wasted, while Tottenham continued to look dangerous on the counter.
Even when the visitor did manage to finally create, it was wasteful, not least when Pablo Fornals somehow contrived to head a deflected Antonio cross over from close range shortly after the restart.
For their part, Spurs looked understandably happy to simply sit on their lead and manage the opposition threat for the remainder of the game, with counter-attacks their main source of chances in the second period.
And it was one such quick break that almost led to Kane grabbing his hat-trick, the England striker clattering the post 10 minutes from time with a fine left-footed effort from distance.
Spurs brought on Bale but his second debut did not end how he would have hoped, as there proved to be a sting in the tail for the hosts.
Their grip on the game seemed to loosen when Balbuena headed in from a dangerous free-kick delivery from the left wing and that was quickly followed by Sanchez's own goal, the defender inadvertently heading Vladimir Coufal's cross beyond Hugo Lloris in the Spurs net.
Lanzini completed the comeback in the fourth minute of injury time as he smashed a marvellous long-range effort beyond a despairing Lloris to make it 3-3.