Everton conceded two goals in two minutes and were awarded two red cards to give Brentford a 3-2 win, missing the chance to secure their Premier League status.
Dominic Calvert-Lewin scored his first goal since August when getting a slight touch on Richarlison's goalbound effort in the 10th minute.
Jarrad Branthwaite was sent off for bringing down Ivan Toney as the last man eight minutes later.
An own goal from Seamus Coleman got Brentford level, but Richarlison put Everton back in front with a penalty in first-half stoppage time.
But Yoane Wissa and Rico Henry struck in quick succession to turn the match on its head.
Everton finished with nine men when substitute Salomon Rondon was dismissed for a reckless challenge.
The Toffees remain 16th on 36 points with two matches left, while Brentford rise to 11th and on 46 points.
See: Everton report | Brentford report
Next fixtures
Everton: 19 May v Crystal Palace (H)
Brentford: 22 May v Leeds (H)
Match officials
Referee: Michael Oliver. Assistants: Stuart Burt, Scott Ledger. Fourth official: Andy Madley. VAR: Darren England. Assistant VAR: Sian Massey-Ellis.
WHO'S GOING TO BE YOUR
MAN OF THE MATCH?
Vote at Full-time