Álvaro Negredo and Sergio Aguero scored first-half goals to leave City ahead at the interval after Romelu Lukaku had initially given the Toffees a 16th-minute lead at The Etihad.
The Citizens, who lost their two previous top-flight games, were able to wrap up three points when Sergio Aguero’s spot-kick ricocheted into the net off Everton goalkeeper Tim Howard.
“It was not an easy game for Joe Hart but he did not have too much work,” Pellegrini told BBC Sport.
“He is mentally strong is Joe. I spoke long with him after the match against Bayern Munich, it was not an easy decision for me to take because I was not sure how he would react but after talking with him I felt he had the character to play today and I am very happy for him.
“I am always talking with the players and my staff, it was a decision I decided yesterday but how near, it doesn’t matter, he played.”
Pellegrini also admitted the Citizens desperately needed three points after back-to-back defeats in the past week.
“We really needed this victory because at the start of the game we were five points behind Arsenal and it is important to continue wining here at home,” he added.
“Equalising immediately was important but more important was the character of the team, playing against Everton – the only unbeaten team in the league.
“After a defeat on Wednesday it was important for me to see how the players reacted after that defeat.”
MORE: Man United latest news
MORE: Arsenal latest news
MORE: Chelsea latest news
MORE: Liverpool latest news