City went in front against the run of play on 10 minutes, Stephen Ireland sending a superb shot curling into the top corner.
The hosts had to wait just 11 minutes for a second as Darius Vassell’s low cross rolled perfectly for Benjani, who drilled home.
But the visitors reduced the arrears on 70 minutes when Diomansy Kamara finished through the legs of Joe Hart at the near post.
The Cottagers then levelled when Danny Murphy netted in the 79th minute after Hart had saved his initial penalty.
And in stunning fashion, Kamara slammed home the winning goal for the visitors in the dying seconds.
Fulham are now just three points adrift of 17th-placed Reading with only two games left. City stay eighth.