Trailing to Adam Johnson's goal 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 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."
Sunderland manager Martin O'Neill, who thought his side would end their 11-year win-less run against Everton, was frustrated with the result. "We should have been out of sight at half-time. Instead of being one up we should have been three up," he said
"Having said that, the players played brilliantly away from home against a side who have a great chance of being in the Champions League. It was a great performance by the players. To be fair I thought we were exhilarating in the first half.
"We knew we would be under pressure in the second half but I always thought on the break we looked dangerous. The second goal epitomised a bit of luck and a bit of misfortune. We are obviously very disappointed."