Wenger's side returned back to fourth in the Premier League with Tuesday's victory at the Emirates, where Lukas Podolski's brace either side of Giroud's goal saw them to a come-from-behind win.
Giroud's goal was just his sixth in the league this year, taking his tally for the season to a productive 13.
Wenger was delighted for his fellow Frenchman and said it would take time for the striker to recapture his best form.
"He has gone through a difficult period as you know. I think it affected his game for a while and his confidence," the 64-year-old manager told a news conference.
"You could see he was refreshed and he was up for it.
"At half-time he came in and was very, very down because he missed a great chance in the first half but he responded very well in the second because he is a mentally strong guy.
"When the team went through a bad patch there was a lack of confidence because some results went against us. The first to suffer are the strikers in a period like that.
"You have to slowly rebuild that (confidence) with results and resilience."
Matt Jarvis had given West Ham a surprise lead five minutes before half-time but the visitors were unable to hold onto their advantage heading into the break.
Podolski levelled a minute before the interval with a fine strike and Giroud had Arsenal ahead on 55 minutes after a superb first touch to bring down a long Thomas Vermaelen pass.
Ahead of a trip to Hull on Sunday, Wenger - whose team scored again in the 78th minute through Podolski - said the win was a key confidence boost for his team.
"It improves the confidence of the team, Saturday and tonight improved our confidence," Wenger said.
"We have one advantage (on Everton). The picture is very clear in front of us.
"We want to do it of course. It doesn't depend solely on us but there's a good chance if we win all our games we can do it."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.