Fellaini, introduced with just under 15 minutes remaining for his first appearance of pre-season, capitalised on a mix-up in the Valencia defence to turn the ball home in stoppage time.
The Belgium midfielder, not previously involved under Van Gaal this summer having been rested due to his involvement in the latter stages of the World Cup, struggled last term and has been linked with a move to Napoli.
It will be interesting to see how his United career develops from here as Van Gaal takes the club forward.
Rodrigo Moreno, making the most of ponderous United defending, had earlier made it 1-1 by firing in from close range in the 71st minute when the ball was inadvertently sent his way from a free-kick by the outstretched leg of Tom Cleverley.
Darren Fletcher's deflected 49th-minute strike put the Red Devils in front after their captain-for-the-night Wayne Rooney missed a penalty in the first half, hitting the post.
It was a far from vintage display from United, who may well count themselves fortunate not to have been beaten by their Primera Division opponents.
But they head into Saturday's Barclays Premier League opener against Swansea at the same ground off the back of an impressive pre-season record.
Prior to this game, United had emerged victorious from each of the other five friendlies Van Gaal had been in charge for, beating Los Angeles Galaxy, Roma, Inter Milan (on penalties), Real Madrid and Liverpool.
And in contrast to the gloom of last term, there is a definite sense of renewed optimism growing at United since the Dutchman took charge.
That was certainly apparent in the warm reception a waving Van Gaal received from the stands as he headed for the dugout just prior to kick-off.
Source : PA
Source: PA