Stoke took the lead through Xherdan Shaqiri's 43rd-minute free kick, but James McArthur equalized for Palace in the 68th and Patrick van Aanholt netted the victor in the 86th.
West Ham scored its second goal in the 64th and it was a strike worthy of settling any match.
Watford ended a poor run of form to beat Newcastle United 2-1.
Carlos Carvalhal's men spurned chances and their failings in front of goal meant they remained very much in the mire.
West Bromwich Albion held on to their slim hopes of avoiding relegation after a stoppage-time goal by Jake Livermore gave the Midlands club a lifeline thanks to a 1-0 Premier League home win over Tottenham Hotspur on Saturday.
Alfie Mawson fouled Wilson on the edge of the area and Andrew Surman squared the free kick to Fraser, whose first-time effort took a slight nick off Mawson and sailed past Lukasz Fabianski.
And with Spurs' fourth place looking suddenly vulnerable Pochettino insisted they need to be ruthless with games against Newcastle and Leicester left. The two teams immediately above it, Swansea and Southampton, have played a match less and meet each other on Tuesday.
In Dallas, NRA supporters and critics converge as national gun debate boils
Gun stocks posted solid gains Friday as President Donald Trump spoke at the National Rifle Association's annual convention . DPD is "a police force that has lost too many heroes, but hasn't lost its will to protect and serve you" Trump said.
Fourth-placed Tottenham's defeat leaves them five points ahead of fifth-placed Chelsea, who can close the gap in the race to qualify for the Champions League if they beat Liverpool on Sunday.
The result mathematically confirmed Palace's safety, as they became the first team to avoid relegation from English football's top flight despite losing their opening seven league games since Liverpool in 1899-1900. But chances are that West Brom will go into the final week of the season with a realistic - though still unlikely - shot at completing the impossible.
Harry Kane was denied by Ben Foster while Erik Lamela and Christian Eriksen were also thwarted by the goalkeeper.
Harry Kane nearly scored a spectacular own-goal until Lloris turned his sliced clearance over with 17 minutes left.
Jake Livermore grabbed a stoppage-time victor against his old club as Tottenham went down 1-0 at The Hawthorns.
Less than three hours later, it seemed their heroics could be all in vain as Nathan Redmond's header for Southampton at Goodison put the Saints, who later had Maya Yoshida sent off, in sight of the three points that would condemn Albion.
Everton struck in the dying moments of the second half to earn themselves a 1-1 draw with Southampton on Saturday evening.