Trailing to Sunderland winger Adam Johnson's first goal for the club on the stroke of half-time the Toffees struck twice in quick succession through Marouane Fellaini and Nikica Jelavic to clinch three points with 11 minutes to go.
It was Everton's first win in five matches, keeping them in the top four, and ensured Moyes could end a landmark 400th game with a smile.
"I thought it was going to be one of those days. It didn't look as if it was coming," said the Scot. "I thought it looked like a 1-0 to Sunderland - but that was not for us not trying to keep knocking at the door.
"In the end I think we got what we deserved because we kept at it.
"I thought we played quite well in the first half but found ourselves a goal down and a bit fortunate not to be two down.
"If that had been the case you would have to have said that was unjust.
"We didn't deserve that with our possession, we just hadn't created any clear-cut chances from our good play.
"We needed something because Sunderland had the third-best defensive record in the Premier League and they had showed that resilience and made it hard for us to score.
"I thought we kept going and the players showed great character to come from a goal behind.
"Maybe the amount of pressure we had told a little bit."