Gueye remonstrated with Keane after a Manchester United attack broke down and then appeared to slap his team-mate. Keane reacted by pushing Gueye away. The Senegalese midfielder was then sent off by referee Tony Harrington.
The red card led to an angry reaction from Gueye, who had to be held back by his team-mates.
The laws state that striking an opponent, or any other person, on the head or face, with their hand or arm, unless the force was negligible, is a red card offence.
Despite having 10 men, Everton went on to win the game 1-0 courtesy of a goal from Kiernan Dewsbury-Hall.