Joel Asoro gave the Black Cats a shock lead in the first half but Lucas Piazon got the home side level just before half-time, shortly after the away side had a strong penalty appeal turned down.
It looked as though they might have done enough to secure a point but Aleksander Mitrović was on-hand again to ensure the hosts came away with another vital three points.
Black Cats stun Craven Cottage
Fulham boss Slaviša Jokanović named the same starting line-up for the fourth game running as his side looked to keep the pressure on Cardiff City in the race for automatic promotion to the Premier League.
As for Sunderland, Chris Coleman opted to make three changes following the 2-1 defeat to Burton Albion last weekend which confirmed their relegation.
Ethan Robson, Ovie Ejaria and Asoro came in for Lee Cattermole, Aiden McGeady and Callum McManaman.
It was a rather uneventful start to the game, as the Cottagers really struggled to get going. The away side registered the first two attempts on goal in the game, but neither Asoro or Ashley Fletcher could trouble Marcus Bettinelli with long-range strikes.
However, the home side were punished for their slow start in the 27th minute as the Black Cats took a shock lead.
19-year-old striker Asoro put his side ahead as he turned brilliantly to get past Matt Targett, before finding the bottom left-hand corner of the net to make it 1-0 and pick up his third goal of the season.
It got even worse for the hosts just before half-time as Targett limped off with an ankle injury and was replaced by Aboubakar Kamara. They were really struggling to create many clear-cut opportunities against a side who were playing with no pressure on their shoulders.
However, the Cottagers did finally manage to the breakthrough in the latter stages of the first half, admittedly against the run of play.
Ryan Fredericks did well down the right-hand side and his cross into the area was turned into the back of the net by Piazon, despite a slight touch by Jason Steele.
Mitrovic the hero yet again
The first chance of the second half fell to the home side. Substitute Kamara managed to weave his way into the area before his shot from a narrow-angle was blocked.
The hosts came into this game knowing that they really needed to win if they were to keep their automatic promotion hopes alive. This came across in the way they started the second half as both Stefan Johansen and Mitrović forced good saves out of Steele.
Backed by a large travelling support, the Black Cats were certainly not playing like a side which had already been relegated to League One.
They were defending with relative ease, only being troubled by Fredericks when he found space down the right-hand side to run at them.
The hosts did begin to find a bit more space in the final third in the latter stages. Tom Cairney, who has been instrumental for the Cottagers again this season, should have done better when he cut inside on his left foot with around 20 minutes to play, but his shot sailed just wide of the top corner.
However, they were able to get themselves in front in the 75th minute.
Johansen's free-kick was lofted into the area and on-loan Newcastle United forward Mitrović was there to head home and give his side a vital 2-1 lead. It was his 12th goal in just 14 Championship appearances.
This goal was good enough for the Cottagers to claim another vital three points and continue their remarkable run of form in the Championship.
The pressure is now on Cardiff in their match tomorrow at the KCOM Stadium against Hull City.