Both sides struggled to create much in a disappointing first half in which neither goalkeeper was tested, though Leroy Sane will have been aggrieved not to have earned a penalty.
But City found their stride after the break and it was Kompany, restored to the starting XI having been left out for the 3-1 victory over Hull City, who broke the deadlock.
The Belgian’s header, which should have been saved by Fraser Forster, ended a 20-month drought – though the injury-plagued defender has only played 17 top-flight games in that time.
Sane finished a rapid City counter-attack to effectively put the game to bed 13 minutes from time, before Sergio Aguero added gloss to the scoreline with a close-range header.
Pep Guardiola’s men leapfrog Liverpool into third and are seven points ahead of Everton and Manchester United, although their city neighbours have two games in hand.