The Hammers took a shock lead just before the break when Angelo Ogbonna headed home, but City came fighting back and equalised through Nicolas Otamendi, before David Silva scored the winner seven minutes from time.
Moyes has now overseen three defeats and a draw since taking over from Slaven Bilic, but insists things will soon be looking up.
His team sit 19th in the table, with Chelsea and Arsenal their next opponents, but the Scot is refusing the repeat the overly pessimistic tone he struck at Sunderland.
"I always think we will get away. I don't think we will be in trouble," he said. "I think we have a good team, good players. I thought this performance gives us hope it can be done.
"I said to the boys if we do that against the other top teams we will give ourselves a chance and, as everyone knows, we've got a lot of the top teams coming up in the next few weeks."
As for the pragmatic approach he sent the team out with, Moyes made no apology.
"I really want the football to be attacking but we are playing against a team that we can hardly get the ball so what are you going to do?" he said.
"I'm not going to stand and give them every opportunity to score. I'm not here to make it look good for Man City, I'm here to get a result for West Ham."