Despite taking the lead through Wayne Rooney in the 12th minute, Ronald Koeman’s men capitulated and let in four second-half goals.
Aside from the goals, the Africans churned out attention-grabbing performance at Goodison Park.
First, Gueye got dismissed – the first of his career after picking up a second booking for a reckless tackle on Granit Xhaka 22 minutes from the end.
His exit was the tonic the visitors needed as Arsene Wenger’s men profited from the numerical disadvantage to subdue the hosts.
The 28-year-old has been a regular in Koeman’s side having featured in all Everton nine EPL games this season. His dismissal means he will miss his side’s clash with Leicester City at King Power Stadium.
For Niasse, he came off the bench to score Everton’s second goal after replacing Dominic Calvert-Lewin in the 75th minute.
The goal was Niasse’s third English topflight strike from four games this term after he was recalled from his exile in the U23 squad.
With this defeat, Everton remain in the relegation zone with eight points from nine outings – five points above Crystal Palace who sit at the base of the log.