Marko Arnautovic proved the first-half matchwinner for the Irons.
The West Ham supporters stuck behind their team and were a huge influence in the second half as the eleven on the pitch put in a backs-to-the-wall display, and Moyes admitted they played a big part.
“For anybody to say there is not a good atmosphere here, they’re wrong. They’d have to be here today to see the great atmosphere inside the stadium. The supporters knew the game was on the edge.
“We were fighting to not concede and the crowd were great and they played a big part.
“They appreciated the effort the players are putting in, and if they’re putting that effort in, then supporters will cheer them. Ultimately, we want to play our football better, but it can only be one step at a time.
“We need our season to turn now. We’ve beaten the champions today, it’s a great achievement for us and a great three points.”