Jon Shaw's hat-trick moved Gateshead up to second as they held off a late fightback from Hayes and Yeading.
Shaw, who has now scored 10 times this season, put the visitors ahead with a calm finish from 12 yards and then headed home from Michael Cummins' pass.
Another Shaw header made it 3-0 but the hosts pulled one back with Louie Soares' penalty after he had been fouled in the area by James Curtis.
Tom Collins scored late on from close range for Hayes but Gateshead held on.
VIEWS FROM THE DRESSING ROOM
Gateshead boss Ian Bogie told BBC Newcastle:
"Being 3-0 up at the interval, we had played fantastically well to play that well coming into the interval, we spoke about doing our jobs properly.
"We knew Hayes & Yeading would come out with a head of steam in the second-half because we had been that superior in the first half and they needed to show more pride and passion which they did, credit to the opposition.
"But on the flipside we've created enough opportunities to win 7-2 or 8-2, we were that far ahead, the scoreline suggests a close game but we made it very difficult for ourselves."