The home side controlled large parts of the opening half, but they were unable to find a route past Ali Al-Habsi in the home goal.
Chelsea continued to dominate after the restart and went on to break the deadlock in the 62nd minute. Raul Meireles hooked the ball into the area and Serbian defender Ivanovic was on hand to score from close range.
Visiting Wigan were unhappy with the goal, believing that Ivanovic was in an offside position when he fired in.
Just two minutes later Ivanovic was called into action up the other end. Victor Moses squared for Franco Di Santo, whose shot beat Petr Cech. However, Ivanovic got himself back on the line to clear for a corner.
With 13 minutes remaining Mata had a chance to make the points safe, but he headed Drogba's cross over Al-Habsi's bar.
Just as it looked as though the spoils were going to be shared, Mata fired in the rebound after Fernando Torres had volleyed against the post.
The late victory has moved Chelsea up to fifth in the Premier League table.