Yaya Toure opened the scoring with a sublime 20-yard free-kick and Kompany doubled the advantage from close range before the break.
Kieran Richardson then kick-started a Fulham fightback with his first Premier League goal since October 2012, and Kompany inadvertently leveled matters with a sliced attempted clearance in the 69th minute.
But Jesus Navas saved his teammate's blushes 12 minutes from time, powering home from a tight angle after receiving the ball from David Silva, before James Milner made sure of the three points.
The win stretches City's unbeaten run to six and lifts it to second in the Premier League, above Chelsea and Arsenal who play on Monday, while Fulham remains in the relegation zone.
Fulham made two changes to the side that lost 4-1 at Everton last Saturday, with Adel Taarabt and Richardson coming in for Alex Kacaniklic and the injured Dimitar Berbatov.
Manuel Pellegrini, meanwhile, made three alterations to the XI that started last weekend's 6-3 victory over Arsenal, with Joe Hart making his return in goal and Aleksandar Kolarov and Edin Dzeko replacing injured duo Pablo Zabaleta and Sergio Aguero.
Two of the incoming players were in the thick of the action early on, as Hart got down well to his left to deny a well-struck Taarabt effort from the center of the penalty area.
At the other end, Silva went even closer to giving City the lead in the 14th minute, rattling the crossbar from 12 yards.
And City broke the deadlock nine minutes later, as Toure sent a superb curling free-kick into the top right-hand corner of the net off the underside of the crossbar from 20 yards.
Fulham pushed for an equalizer, and Taarabt had Hart sprawling once again as the England goalkeeper tipped a driven effort around his right-hand post just after the half-hour mark.
Taarabt continued to look Fulham's biggest threat and had another long-range strike deflected wide by Kompany six minutes from the interval.
Kompany added the second in the 43rd minute, prodding home from close range after Maarten Stekelenburg had parried a Martin Demichelis header from a Silva free-kick.
Fulham made a dream start to the second half as Richardson tapped in from six yards to reduce the deficit after some good work by Taarabt down the left wing.
And City was punished for its failure to put the match to bed 10 minutes later as Fulham equalised in bizarre fashion. Kompany swiped at a clearance, only to see the ball loop over the head of goalkeeper Hart and into the back of the net.
But the visitors recovered from that embarrassing episode, as Navas found the net in the 78th minute to put City back in the lead, before Milner got on the end of a superb Alvaro Negredo pass to make certain of maximum points.