Reduced to 10 men after Wayne Rooney's shocking foul on Stewart Downing in the 59th minute, United endured a barrage of aerial balls from the visitors, who had an 89th minute Kevin Nolan goal disallowed for offside late on as they laid siege on the hosts' goal.
United clung on for a valuable three points as Old Trafford rocked to the defiant tone heard during David Moyes' miserable era. This, though, was a game to savour and Van Gaal was delighted with his players' commitment.
"The red card of Wayne changed everything and you cannot defend it easily because they are still playing with the long ball," Van Gaal said. "Our height is not good enough and then it is always dangerous.
"Then you have to fight, fight and another fight and I am very pleased with the attitude of my players because they fought until the end and I said after the match to them then you shall always be rewarded with a very good result."
Rooney's red card - his first in a United shirt for five-and-a-half years - will dominate the post-mortem. After a United corner was cleared, Luke Shaw's pass deflected into Stewart Downing's path just outside the Hammers' area and his attempt to initiate a counter-attack was viciously ended by Rooney's hack.
United adapted commendably well without their captain, as substitutes Darren Fletcher and Antonio Valencia helped man the barricades, but had Rooney apologised for his violent conduct?
"Wayne is always coming to me," Van Gaal said, evading the question. "Maybe you don't want to hear it but maybe you do know you make professional fouls and I have seen it today, I think five or six times, and Wayne has done that also.
"I think he did it too unfriendly and maybe that is his biggest mistake, but I have seen also these professional fouls without the yellow card or red card so that's a little bit strange.
"He wanted to do that but, I don't know, you have to explain that. He said to me he wanted to do that but you cannot change that anymore and he is a great miss because he played very well. I was very pleased with him, he scored a goal."
When one journalist challenged Van Gaal on the wisdom of Rooney's behaviour, he issued one of his infamous put-downs.
"For me, it's neither a good analysis of you and neither a good question."
Robin van Persie's second goal of the season proved to be the winner in a "dominant" first-half buoyed by Rooney's fifth-minute opener. However the Hammers struck prior to the interval via a corner, beginning a nervy afternoon for the Old Trafford natives, although Van Gaal claimed David de Gea was "touched by the opponent, so maybe you can cancel this goal also."
Nineteen-year-old Patrick McNair experienced a joyous debut with a game-saving header deep into the second-half, although his manager couldn't resist taking some of the credit for the Northern Irishman's emergence.
"You make a solution to put Daley Blind in the centre of defence because that is easy to do," Van Gaal explained. "He has played there also in the Dutch national team but I don't like two left central defenders and I don't like two right central defenders, that's why we have brought [Marcos] Rojo for this position. And because of that we are looking at the youth academy and, of course, we have seen them already [last] Monday against Sunderland.
"And then I like [McNair] already and then we put him in the squad, we trained in this new organisation because we played with Rojo for the first time in this position, Shaw, because he was also injured, for the first time in the Premier League and then Paddy McNair. And when you see what we have done I think we have done it very good."Suggest a correction