The former Inter Bratislava frontman struck 13 minutes from time to send Boro to the relative comfort of 11th place in a tense encounter watched by just 26,235 at the Riverside Stadium.
Alen Boksic had given the Teessiders a 27th-minute lead with a coolly-taken finish, but once Steve Marlet levelled 11 minutes after the restart, the game was back in the melting pot.
However, Nemeth's intervention allowed Boro boss Steve McClaren to breathe a huge sigh of relief as his side edged closer to their survival target after a game they simply couldn't afford not to win.
The presence of Boksic and livewire Italian Benito Carbone were major factors, but again it was defensive solidity in the face of a second-half onslaught which laid the foundation for success.
The margin of victory could have been more comfortable had Ugo Ehiogu's
72nd-minute header not come back off the crossbar, but the England international had to produce a superb injury-time tackle on Marlet to deny the Londoners a second equaliser at the death.
Both sides went into the game with a reputation for conceding few goals but scoring not many more, and for that reason, the appearance of the names of leading scorer Boksic and Italian loan signing Carbone on the team-sheet was welcomed by another sparse crowd at the Riverside.
And the script was largely followed in the opening stages as on open game unfolded with few glaring chances and defences more or less on top.
It was 12 minutes before either keeper was called upon to make a save, Mark
Schwarzer clutching Steed Malbranque's long-range effort into his midriff, but neither he nor Edwin van der Sar were unduly troubled for much of the opening period.
With Sean Davis prompting from deep in midfield and Marlet showing well in attack, Fulham played their usual brand of neat football, but Boro stood firm at the back and started to take control.
Carbone's movement and the efforts of full-backs Robbie Stockdale and Franck Queudrue to support the men ahead of them started to pay dividends, and it was no real surprise when they took the lead with 27 minutes gone.
Jonathan Greening and Paul Ince combined to give Carbone the time to pick out Boksic's forward run, and although he looked yards offside, he kept his composure to draw van der Sar and nonchalantly chip the ball over him for his seventh goal of the season.
The Teessiders grew in confidence as the half wore on and Carbone squandered two good opportunities to extend his side's lead.
But they almost threw away their advantage in injury time when Marlet was allowed to chase down a harmless looking long ball to round Schwarzer, although he lifted his shot from a tight angle wide of the mark.
If that was something of a let-off for the home side, they did not heed the lesson as the visitors emerged for the second half determined to force their way back into the game.
Malbranque had already produced a fine tackle from Ehiogu after a mazy run when central defensive partner Gareth Southgate conceded a 56th-minute corner under pressure from Marlet.
Collins curled the ball into the near post where Alain Goma flicked it on for the unchallenged Marlet to head home.
McClaren changed things around five minutes later when he replaced Robbie Mustoe with wing-back David Murphy and opted for a three-man defence, and his side were at sixes and sevens as the Londoners carved their way through at will.
Davis and Malbranque opened the Teessiders up once again on 65 minutes for Marlet to test Schwarzer with a curling drive, prompting McClaren to freshen it up once again with 20 minutes remaining by sending on Nemeth and Windass in place of Whelan and the tiring Carbone.
Ehiogu was unfortunate not to restore his side's lead two minutes later when he saw a powerful header from Greening's corner come back off the bar.
But the substitutions paid off on 77 minutes as Nemeth turned upon the left side of the penalty area to crash a low drive past van der Sar to restore his side's lead.
There was no let-up in pace as the minutes ticked away, but the home fans were on the edges of their seats deep into injury time when van der Sar launched a huge clearance into the Boro box.
The ball evaded Ehiogu and was brilliantly controlled by Marlet, but the defender recovered to get in a last-ditch tackle to protect his goal once again.