Rooney will wear the armband in United's season opener against Swansea City with Darren Fletcher named the vice-captain. The striker takes over the captaincy from Nemanja Vidic who joined Italian club Inter Milan in the offseason.
Substitute Marouane Fellaini scored in second-half stoppage time in United's final warm-up game ahead of the start of the new season.
Van Gaal, who signed a three-year contract to succeed David Moyes at Old Trafford, had enjoyed a strong pre-season winning all five of the club's matches on their tour of the United States.
Despite the late victory, van Gaal was critical of his team ahead of the start of the season.
''I think it was our worst match today. There was a lot of wrong choices, wrong passes and we didn't press so good,'' said the United boss.
However he was quick to praise the home crowd after walking out at Old Trafford for the first time.
''Fantastic. They (the fans) are shouting and screaming your name,'' noted the 62-year-old
Wayne Rooney spurned the chance to give the hosts a first-half lead, when his penalty was saved by goalkeeper Diego Alves in the 32nd minute. Rooney had seconds earlier been felled in the penalty area by defender Antonio Barragan.
United broke the deadlock shortly after the restart when Darren Fletcher slotted home from the edge of the area. Ashley Young's 49th minute corner eventually fell into his path and the Scottish international netted albeit with the aid of a deflection.
Valencia almost equalized in the 65th minute when Rodrigo's goalbound header was flicked off the line by Javier Hernandez.
The visitors were undeterred, and continued to press forward in search of a goal. They were deservedly rewarded in the 71st when Rodrigo blazed a first-time volley into the roof of the net following a free-kick.
Moments later, substitute Pablo Piatti poked a shot wide from close range. After being picked out by Jose Gaya on the left wing, he slid his attempt past David De Gea's right-hand post and the La Liga side were left to rue that miss when Fellaini struck late on.
''At the end we are the winner because we are fighting to the last minute and that is also a good signal I believe,'' added van Gaal.