Tottenham took the lead from a corner after a goalmouth scramble ended with the ball crossing the line in the 42nd minute.
João Palhinha had been left unmarked at the back post and headed against the post before sending the rebound back into the six-yard box.
Everton appeared to have cleared the danger, but the ball had already gone over the line.
Meanwhile, West Hamâs hopes were lifted in the 67th minute when Taty headed home from a Jarrod Bowen corner to put them 1-0 ahead against Leeds.
Bowen later doubled the lead in the 78th minute, converting a Fernandes assist to make it 2-0.
Wilson made it 3-0 in stoppage time, but it wasn't enough as the Hammers rounded off the season in the bottom three.
Nine minutes of added time had Tottenham fans on edge during the last game, but Palhinha's goal was enough to see the Lilywhites stay up after an eventful season.
Spurs began the day two points above 18th-placed West Ham and knew a win over Everton would guarantee survival.
West Ham, meanwhile, had to beat Leeds to stand any chance of staying up.
Tottenham missed the chance to relegate West Ham on Tuesday as Roberto De Zerbi's team fell to a 2-1 defeat at Stamford Bridge, leaving it to a final-day decider for Spurs.
Fans of the north London club lined the streets in their thousands to welcome the team coach ahead of the game, and provided a rapturous reception to greet the players onto the pitch.