Benrahma gave the hosts the lead against the run of play.
Ronaldo restored parity for Manchester United with a tap in.
Lingard came off the bench to score the winning goal with a powerful strike.
De Gea ensured the points when he saved a last-minute penalty from Mark Noble.
In the other game, Brighton defeated Leicester City 2-1.