Iceland international Heidar Helguson grabbed a vital winner to give Watford a survival lifeline.
Victory gave new manager Adi Boothroyd his first victory since taking over at Watford after three defeats in a row.
But the Hornets made heavy weather of picking up the points against already relegated Rotherham.
Rotherham keeper Mike Pollitt denied Watford with a save at full stretch as he turned an early shot from Brynjar Gunnarsson around the post.
And when Bruce Dyer headed a Chris Eagles' cross goalwards, Pollit saved again before Helguson scooped a golden opportunity over the top after 14 minutes.
Helguson produced a clever shot on the turn, forcing another important stop from Pollitt and, when Eagles dazzled down the right, Pollitt had to turn away a surprise shot at the near post.
The breakthrough came from the resulting corner as Rotherham failed to clear a sharp cross from Eagles. The ball was swung back in and Danny Cullip's flick found Helguson in space and he produced a cool finish from five yards.
Rotherham's first opportunity came two minutes before half time but keeper Alec Chamberlain clung on to a header from Tony Thorpe after a cross from Michael Keane.
Watford might have added a second goal early in the second half but Pollitt again denied them when he saved from substitute Anthony McNamee.
And when an opportunity fell to Gunnarsson his long-range effort was well wide.
A rare chance came Rotherham's way when Rob Scott found Martin Butler but the striker's first-time effort from the edge of the area was wide.
And a late chance was headed over by Thorpe after he was picked out by Keane's cross.