Edin Dzeko's first-half header was enough to see City overcome their rock-bottom hosts and end an 11-match goal drought for the Bosnian, who took his tally for the season to 14.
City made hard work of it after that, though, with Dzeko costing Sergio Aguero a clear chance to double the lead after half-time.
"We needed that win and the big man needed a goal and he got a great goal in the first half and the lads did great," Hart - who made a match-winning save in the second half, told Sky Sports 1.
"It wasn't pretty, and it wasn't a pretty pitch out there. Fair play to Wigan, I think they are in a false position in the league at the moment for me so it's a great result for us.
"We've not been great on the road recently so we're really happy."
Goalscorer Dzeko said: "I could have scored one or two more goals in the end, but I'm happy with the three points because it was a tough game and Wigan played very well.
"I'm happy to score and help my team win. In football sometimes you score and sometimes not, but I'm happy today."
Asked about the moment of confusion with Aguero, Dzeko said: "I was waiting for him to shoot. In the end the ball came to me and he wanted to shoot, and I wanted to shoot, but it doesn't matter. We're happy now."
City boss Roberto Mancini said: "It was about the victory not the performance tonight.
"It was really important to win tonight. We knew that was difficult because Wigan this month have played very well and Roberto Martinez is a fantastic manager.
"I was nervous when it was still 1-0 but that's normal, every player and manager is nervous."
Mancini hopes Dzeko can build on the goal.
He added on Sky Sports 1: "I'm very happy for him because he deserved to score a goal. He scored this very important goal for us and I hope he continues it in the next game."
Martinez insisted his side had only themselves to blame. "The manner that we finished the game is probably what pleases me most," said the Latics boss.
"We probably had our worst first half this season, we were cagey, but in the second half we took control a bit more and had the feeling in the last 20 minutes that there could be a chance coming our way.
"I'm a little bit disappointed because I felt the best opportunities for Manchester City came from our errors."
Asked about the free-kick which led to the goal, Martinez said: "It was a really, really soft one, but it's about what you do after that (to defend the free-kick)."