Togo had a clear chance to take the lead after just three minutes when Emmanuel Adebayor collected possession from Kolo Toure before rounding the goalkeeper, but somehow Boubacar Barry just managed to palm the ball to safety.
Ivory Coast made them pay five minutes later, however, when Yaya Toure collected a pass from Gervinho before striking a powerful effort into the back of the net. The chances continued to fall for Togo, however, and Serge Gakpe just fired a long-range effort wide after 16 minutes.
Togo twice came close to levelling the score either side of the 30-minute mark with efforts from Gakpe and Jonathan Ayite, but both strikes were just wide of the target.
Chances remained few and far between in the latter stages of the half, but Yaya Toure smashed the post with a long-range effort moments before the interval. There was to be late drama, however, with Ayite ghosting into the penalty area to level the scores in first-half stoppage time.
A scrappy start to the second period brought an early chance for Didier Drogba, but his long-range strike was high and wide of the goal. Gakpe threatened for Togo moments later when he picked up possession before driving into the penalty area, but Kolo Toure just quelled the danger at the vital moment.
Togo thought they had taken the lead just past the hour mark when Dare Nibombe headed home from a corner, but the referee pulled play back with the set piece deemed to have been taken too early, much to their frustration.
Togo continued to look the more likely to score the winner as the match entered the final 20 minutes, while Ivory Coast replaced Drogba with the skipper being marked out of the match. Yaya Toure came close moments later, but his effort from close range was straight at the goalkeeper.
Both sides created opportunities in the latter stages with Togo's Vincent Bossou striking a powerful effort over the crossbar from close range. However, Ivory Coast secured a dramatic winner in the final moments as Gervinho converted from close range.