The Spain international drilled a low shot past Maarten Stekelenburg to give the visitors the points and the Englishman added a layer of gloss to the win with a clinical finish
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 levelled matters with a sliced attempted clearance in the 69th minute.
|VIEW FROM CRAVEN COTTAGE
|By Ewan Roberts
Manchester City move into second place in the Premier League table with an excellent attacking display against Fulham – their fourth consecutive win over the Cottagers.
Before today, Manuel Pellegrini's side had averaged 2.8 fewer goals away than at home, but notched four times on a productive afternoon in west London, their third consecutive away win in all competitions, which suggests they are finally finding their feet on the road.
Fulham were excellent, though, and played their part in a hugely entertaining match at Craven Cottage. Rene Meulensteen's gameplan was excellent and well executed, with the home team dominating for periods.
If the Cottagers can maintain that work-rate and quality of play, they will soon escape the relegation zone, while City's improving away form should worry the rest of the division.
But Jesus Navas saved his team-mate'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 them to second in the Premier League, above Chelsea and Arsenal who play on Monday, while Fulham remain 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 centre 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 equaliser, 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 were punished for their 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.