When Dominic Calvert-Lewin scored within moments of coming off the bench Brighton were 2-1 down, facing up to a second defeat on the bounce and looking miserable near the relegation places.
20 crazy minutes later, complete with VAR check and an own goal, Albion were celebrating wildly after a late 3-2 victory saw Graham Potter's team move up to 12th in the Premier League table.
Pascal Gross had given Brighton a 10th minute lead with a thunderous freekick but just five minutes later Richarlison's near-post header brushed off Adam Webster to level the scores.
Calvert-Lewin's clever second half finish gave Everton hope of securing their first away of the season but VAR soon ruled Michael Keane's contact with Aaron Connolly in the box was enough to warrant a penalty. Neal Maupay remained calm to fire home beyond England goalkeeper Jordan Pickford his fourth of the season. Everton manager Marco Silva was furious.
Brighton claimed the winner four minutes into injury-time when second half substitute Leandro Trossard crossed dangerously from the left and Lucas Digne turned into his own net.
Steven Alzate was recalled to the starting line-up for Albion as Aaron Mooy was suspended following his red at Aston Villa.
Brighton opened the scoring when Connolly, who is an absolute menace to defenders, was tripped on the edge of the box. Gross stepped-up and curled a beauty into the top corner for his first goal of the season. Everton, who are now just two points above the bottom three, levelled the scores just five minutes later from a corner.
Pickford launched a quick attack and Dale Stephens tackled Bernard, who was making good progress into the Albion box.
Digne pinged over the resulting corner and Richarlison's near post run and firm header flashed into the net, via the slightest touch from Webster, before Maty Ryan could even react.
Silva was forced into a change when Bernard hobbled off injured and was replaced by Gylfi Sigurdsson. Everton had a decent spell of pressure and it was Sigurdsson who tested Ryan with powerful left footed shot from 25 yards.
Everton piled forward on the counter attack 10 minutes before halftime. Richarlison advanced and set up Walcott and his ball into the box worked it's way to Alex Iwobi. The Nigerian international's shot deflected of Dan Burn's leg and Ryan quickly changed direction and saved low to his right as Everton finished the half brightly.
Alzate, 21, and making just his fourth Premier League appearance, occupied each midfield position over the course of the match. He started centrally, switched with Davy Propper to the right and started the second half on the left wing, with Gross moving to the right.
Alzate is comfortable in each role and just after the interval he tricked his way past Sidibe and his right footed shot looked momentarily dangerous but rose over the bar. Maupay was lurking and wondering why he didn't cross.
Gross briefly thought he had claimed his second goal when he converted Davy Propper's cross but he was ruled offside, which was quickly confirmed by VAR.
Ezequiel Schelotto, making his first appearance of the season after six months out with a knee injury, came on for Martin Montoya and Trossard, who hasn't played since the 4-0 loss at Manchester City due to a groin injury, replaced Gross.
Silva made a couple of changes as Calvert-Lewin and Fabian Delph replaced Iwobi and Theo Walcott and it paid off instantly. Mason Holgate picked out Calvert-Lewin and the young England striker finished well as Everton closed in on a first away win of the season.
Albion had around 15 minutes to respond and they did so thanks to a little help from VAR. They have had two decisions go against them at the Amex this season but this time it deemed Keane's contact with Connolly's ankle was enough for a penalty. Amid all the fuss, Maupay calmly converted for his fourth goal of the season.
With Glenn Murray now on in place of Connolly, Graham Potter's men were now pushing for the victory. Lewis Dunk had a freekick saved by Pickford and Trossard was causing problems on the left.
With time running out, Dan Burn bombed forward and flicked the ball to Trossard who crossed dangerously and Everton captain Lucas Digne slid into to his own.
It may well prove a season defining 20 minutes for Potter and Albion
Brighton: Ryan; Montoya (Schelotto, 66), Webster, Dunk, Burn; Gross (Trossard, 66), Stephens, Propper, Alzate; Connolly (Murray,80), Maupay.
Subs: Button, Bissouma, Balogun, March