Jake Hyde got the show on the road for Barnet with a clever lob over advancing Millers goalkeeper Andy Warrington after 21 minutes, racing on to Mark Byrne's ball down the right flank.
And eight minutes from time Barnet completed the job against their promotion-chasing hosts, Ricky Holmes beating his marker wide on the left and squaring for substitute Andy Yiadom to sweep home an unmissable chance.
"I didn't expect it," Davids said. "But it went our way.
"Two very good goals as well but we have played better without getting the points, but we got the points. We had some good spells which I am happy about, but we have played better.
"If it had been 0-0 I would definitely have been delighted, but now I am even happier because we won.
"That's three wins in four but we still have to stay focused because every game for us is a final no matter who we play against because, at the end of the day, we are still close to the bottom of the league. Four of the bottom five have won so if they keep on winning we have to keep on winning."
- Sports & Recreation
- Andy Warrington
- Mark Byrne