Sean Dyche's Burnley are now three points clear of Boro at the top of the table, although the Teesside club have a game in hand.
The Lancashire outfit got off to a perfect start at Craven Cottage as Wales striker Sam Vokes nodded in a Scott Arfield corner to grab his tenth league goal of the season and give the visitors a ninth minute lead.
But Fulham dealt the promotion-chasers a double blow shortly afterwards.
Ross McCormack continued his prolific scoring form with his 20th goal this term, before 19-year-old striker Moussa Dembele bundled the hosts ahead with his chest midway through the first half.
Fulham manager Slavisa Jokanovic has come under increased pressure in recent weeks with his side stuck in a relegation battle, despite having the second-best attack in the division.
It has been their porous defence that has cost them time and time again, and their Achilles heel tripped them up again shortly after half-time.
Vokes scored early in the first period and he did so once more in the second, slotting in a penalty after Joey Barton was hauled down in the area.
The comeback was completed when the Championship's top scorer Andre Gray drilled home from the edge of the area, keeping Burnley well placed to make an immediate return to the Premier League after their relegation last year.
Middlesbrough would have been confident of making it four wins in five matches when they visited lowly Rotherham.
The closest Aitor Karanka's side came was when Uruguayan Gaston Ramirez curled a free-kick against the post in the first half.
But the Millers produced the sucker-punch two minutes from time through Lee Frecklington's effort, and held on despite Greg Halford's red card to move to within a point of safety.
Brighton were also left frustrated as they were held to a 0-0 stalemate by Sheffield Wednesday at the Amex Stadium, their 14th league draw of the campaign.
They do move up once place to third, two points adrift of Boro.
The draw on the south coast was enough to keep Wednesday in the play-off places with Ipswich conceding a dramatic equaliser in a 2-2 draw at bottom club Bolton.
The fans at the Macron Stadium were given respite from recent off-field difficulties, thanks to Stephen Dobbie's penalty seven minutes into time added on.
Fifth-placed Derby, whose sacking of Paul Clement last month was one of the least expected managerial changes of the season, lost for the second time in three games at QPR.
Tjaronn Chery and Gabriele Angella scored in either half as Jimmy Floyd Hasselbaink's Rangers ran out 2-0 winners.
Cardiff's play-off hopes took a hit as they were beaten 2-0 at home by Leeds.