The match was played as conflict in Ukraine entered a third day following Russia's invasion of its neighbour country.
Prior to kick-off, City players wore T-shirts displaying the Ukrainian flag and a message that read: "No War," while Everton's starting XI emerged from the tunnel with Ukrainian flags draped on their shoulders.
Two Ukrainian players were named on the bench -- City's Oleksandr Zinchenko and Everton's Vitaliy Mykolenko. The pair embraced in the prematch warmups, and Zinchenko cried when Everton fans held up banners in support of Ukraine.
A below-par City survived a huge Everton penalty claim when a potential handball in the box by their midfielder Rodri was checked by VAR.
In the end, victory was all that mattered as they held on to move six points ahead of Liverpool, who have one game in hand, in the table.
City have 66 points from 27 games with Liverpool on 60 with the sides still to play each other at the Etihad in April.
Everton's fifth defeat in six league games leaves them one point above the relegation zone in 17th place.
"The second half was much better for the consequences of the first half," Pep Guardiola said. "Goodison Park for us is always so difficult. Good victory, another step."
Last weekend's surprise home defeat by Tottenham Hotspur, City's first league reverse since October, opened the door slightly for Liverpool after a fourth title in five seasons had begun to look a formality for Guardiola.
And when they found themselves bogged down at Goodison Park with the clock ticking it appeared the initiative was set to pass to Juergen Klopp's Liverpool.
But when Silva's low cross took a nick off Everton's Mason Holgate and Michael Keane failed to clear the ball, Foden was alert, nipping in to fire past Jordan Pickford who had earlier made a superb double save to keep out Kevin de Bruyne and Silva.
Everton might well feel wronged, however, when they were not awarded a penalty after Rodri mis-judged the bounce of the ball and appeared to control it with his upper arm.
"Thank you so much for all the people at Goodison Park. It was so emotional," Guardiola said. "It is not a nice moment for Zinchenko and the Ukrainian people right now. The people from Goodison Park were amazing for this."
It was a subdued City performance in the first half and it took them almost half an hour to have a shot on target when De Bruyne tested Pickford.
But Everton were not just defending deep, they also carried a threat and Jonjoe Kenny sent a shot into the side-netting after a surging run from Allan.
Richarlison also missed an opportunity before the first half and City were more potent after the break.
But they looked like being frustrated until Foden pounced.
Information from Reuters was used in this report.