Jason Puncheon put the Eagles ahead on 23 minutes after good work from Yannick Bolasie, who got around Leighton Baines before crossing from the right into the centre. Tim Howard could only parry the ball and Marouane Chamakh laid it off to Puncheon to slot home.
Bolasie also hit the woodwork in the first half while Julian Speroni got down well to deny Romelu Lukaku at the other end.
Four minutes after the restart, Scott Dann headed Palace two up from Bolasie's corner but Everton substitute Steven Naismith pulled one back on 61 minutes from Baines' header.
However, Cameron Jerome restored Palace's advantage with a low shot on 73 minutes from Puncheon's assist.
Speroni made a good save to deny Ross Barkley but Kevin Mirallas scored with four minutes remaining to set up a nervy finish.
However, Palace held on to win and surely make themselves safe, while denting the Toffees' hopes of Champions League football.
Everton had been looking to take the opportunity to leapfrog Arsenal into fourth but instead they remain fifth - a point behind the Gunners, with both clubs having four more games to go - after they were undone by a Palace side who were worthy victors of an absorbing contest.
The result, Everton's first home loss since Boxing Day and only their second all season, brought their seven-match top-flight winning streak to an end.
Palace's own run of victories, meanwhile, extended to four games as they moved up to 11th, on to 40 points - the total widely regarded as a guarantee of safety - and 10 points clear of the drop zone, with four more fixtures left.
Everton looked to probe in the early stages, with Aiden McGeady firing over from distance.
As well as doing their job at the back, Palace started to cause some problems going forward and broke the deadlock when Bolasie burst forward, got the better of Baines and delivered a cross that Howard could only push to Chamakh, whose tee-up was turned in by Puncheon.
Five minutes later Mirallas flashed an effort just over, before Bolasie shrugged off Seamus Coleman and cracked a shot against the post from outside the box, with Jerome putting the rebound wide.
Everton came close to levelling with five minutes of the first half to go when Barkley did well to keep the ball in and fashioned a cut-back which Lukaku met with a swivel shot that Speroni got down to palm around the post.
Palace's response in the remaining time before the interval came through their danger man Bolasie, who cut in from the left and lashed an effort over the bar.
Toffees boss Roberto Martinez threw on Naismith for Gerard Deulofeu at the break, but Palace were soon in the ascendancy again and Joe Ledley brought a save out of Howard.
Seconds later it was 2-0 as Bolasie's corner was met by the unmarked Dann, who gleefully nodded the ball in.
Everton sought a quick reply, and they pulled a goal back when Baines met a Mirallas cross with his head and sent the ball to Naismith, who prodded it over the line.
Everton kept up the tempo and Mirallas put a shot over, before Speroni tipped an effort from sub Leon Osman onto the bar.
But the home fans were stunned into silence as Jerome extended Palace's advantage, collecting the ball from Puncheon, getting away from John Stones and slotting in.
Everton pushed forward again and Speroni pulled off a decent save to deny Barkley, before Baines' effort was blocked and Osman struck wide.
The pressure paid off as Mirallas latched on to a through-ball from Barkley - which took a deflection off a Palace man - and beat Speroni.
The Toffees then desperately pushed for an equaliser, but they could not find one, with Mirallas spurning a great-looking opportunity in stoppage time.