James McFadden scored in stoppage time to snatch the win that lifts European hopefuls Everton into fifth spot and keeps Charlton inside the drop zone.
James McFadden, right, celebrates his first goal since December
The Scot flicked the ball up and fired home from 20 yards to settle a tie that had seen three goals in 10 minutes.
Both sides had been guilty of wasteful finishing before Joleon Lescott swept in the hosts' opener from close range.
Darren Bent appeared to have earned his side a point when he turned in from 12 yards but McFadden stole it late on.
It was a breathtaking end to a fascinating tie between two sides that had come into the match on the back of six-game unbeaten runs.
As expected, it was a close encounter at Goodison Park, although only Everton's profligacy prevented them taking a first-half lead.
Andrew Johnson was lively as always in attack for the hosts and he had the first real chance when he latched on to Souleymane Diawara's slip to run through, only to shoot tamely from the angle.
However, it was Leon Osman that was causing the most problems to the Charlton back line and the midfielder came agonisingly close when he cut in from the right and his left-footed curler deflected off Diawara and on to the post, with Addicks keeper Scott Carson stranded.
Lee Carsley went close next for the hosts, drilling over from 25 yards, while James Beattie twice failed to make the most of Osman crosses, with difficult close-range headers.
Bent was the visitors' brightest spark but the striker had to feed off scraps as Everton dominated, although he could have done better when his lob off Talal el Kakouri's pass fell wide.
After Osman had wasted another good chance from Mikel Arteta's free-kick, there was little doubt that Charlton's Alan Pardew will have been the happier manager to hear the half-time whistle.
Darren Bent (right) goes close with a lob at Goodison Park
But he should have been even happier 10 minutes into the second half when Bent latched on to Zheng's pass only to waste a great chance by sidefooting tamely wide.
Unlike in the first half, Charlton were looking a real threat all of a sudden, and Bent raced through for another chance just past the hour, only for Tony Hibbert to block brilliantly.
With the play now sweeping from end to end, Zheng twice went close for Charlton, while Johnson headed inches wide from an Arteta free-kick for Everton.
However, all the goal action was saved until the final 10 minutes, the first coming when Lescott swept in the rebound after Carson had pulled off a superb stop to keep out Johnson's reaction shot.
It was the defender's second goal in four games and the first Charlton had conceded in over eight hours of football.
But the Addicks are made of sterner stuff under Pardew and, with the minutes ticking away, Bent turned inside the box after an up-and-under caused havoc in the box and he thrashed home to equalise.
The scoring was not done there, though, and McFadden popped up with a superb winner - his first goal since December - to break Charlton hearts and fire Everton into fifth as they look to seal a Uefa Cup berth.
Everton boss David Moyes:
"I think we deserved it, but I've got to say that Charlton have been doing very well lately and we always knew, right up until the end, it would be tight.
"Credit to them for coming back when they did as well, and at that point I probably would have taken a point, but luckily we had that extra bit of quality to win it.
"We've relied on Andy Johnson and Tim Cahill too much for goals this season, but now we're getting goals from all over the park and that is exactly what we need."
Charlton manager Alan Pardew:
"We had some great chances and that's the best we've played in the last three or four games, so to lose it is a real blow.
"But it's only the result that's disappointing because we can take real heart from how well we played.
"We must not dwell on this performance. We'll be disappointed tonight, of course, but we gave as good as we got and from Monday onwards we'll focus on the next game and trying to recreate today's quality."
Everton: Howard, Hibbert, Yobo, Stubbs (Naysmith 61), Lescott, Osman, Carsley, Neville, Arteta (Anderson 88), Johnson, Beattie (McFadden 58).
Subs Not Used: Wright, Van der Meyde.
Goals: Lescott 81, McFadden 90.
Charlton: Carson, Young, El Karkouri, Diawara, Thatcher (Bougherra 83), Ambrose, Song Billong, Faye (Holland 55), Hughes (Hasselbaink 83), Zheng, Darren Bent.
Subs Not Used: Randolph, Rommedahl.
Booked: Thatcher, Bougherra, Hasselbaink.
Goals: Darren Bent 89.
Ref: M Halsey (Lancashire).