Luke Berry's late close-range finish helped Cambridge come from behind to beat Hayes.
Hayes took the lead when Mark Bentley scored a stunning curled effort from 30 yards after Luke Berry lost the ball in a dangerous position.
Jordan Patrick nodded down a James Jennings cross for Conal Platt to rifle in an equaliser for Cambridge.
Josh Coulsen headed against the post before Berry side-footed in the winner from Michael Wylde's long throw.
Cambridge Utd: Naisbitt, Roberts, Coulson, Wylde, Jennings, Carew, Shaw, Berry, Platt (McAuley 90), Gash (Patrick 53), Marriott (Jarvis 72). Subs Not Used: Brown, Eades.
Goals: Platt 54, Berry 85.
Hayes & Yeading: Arnold, Bayley, Cadmore, Ujah, John, Bentley, Hand, Soares (Williams 82), Wishart (Mackie 46), Elder (Pacquette 71), Joseph-Dubois. Subs Not Used: Preddie, Saville.
Booked: Arnold, Bayley, John, Hand.
Goals: Bentley 49.
Ref: Nick Kinseley (Essex).