Newcastle made the perfect start when Alexander Isak converted from the penalty spot in the third minute, but West Ham responded well and entered half time in front courtesy of goals from Michail Antonio and Mohammed Kudus.
Jarrod Bowen then increased the Hammers' lead just three minutes after the interval, but the Magpies admirably sparked a memorable comeback, scoring three goals in the final 13 minutes to snatch maximum points in dramatic fashion.
Isak netted his second penalty of the contest shortly before substitute Harvey Barnes scored twice in the closing stages, firstly slotting a composed finish under the legs of Lukasz Fabianski before curling a sensational 20-yard strike into the far corner in the 90th minute, sparking bedlam among the St James' Park faithful.
Newcastle have climbed to eighth in the Premier League table, at the time of writing, and sit just one point behind seventh-placed West Ham, who have played a game more.
Newcastle trio join growing injury listHowever, Newcastle's victory came at a cost as Jamaal Lascelles, Valentino Livramento and Miguel Almiron were all forced off with injuries, while Anthony Gordon was sent off in stoppage time for two bookable offences and will subsequently miss next Tuesday's clash against his former club Everton.
Lascelles went down with a knee injury early in the first half and attempted to carry on, but the centre-back eventually hobbled off in the 18th minute, with Emil Krafth brought on as his replacement.
Livramento, who switched from right-back to left-back
Read on sportsmole.co.uk