Nigeria had dominated almost throughout but had only Emmanuel Emenike's 23rd-minute goal to show for it, and after the dismissal of Efe Ambrose with 16 minutes left Burkina Faso sniffed an opportunity.
Nigeria wasted further chances to put it beyond doubt and then paid for it at the death as Traore fired home in the 94th minute.
While the result extended Burkina Faso's winless run in the African Nations Cup to 18 matches, you could hardly tell by the way they celebrated the final whistle.
Nigeria dominated the first half, with almost one-way traffic towards Abdoulaye Soulama's goal.
Brown Ideye wanted a penalty early on after a fine long ball from Jon Obi Mikel found him in the area and he tumbled under the challenge of Bakary Kone, although there was a fairly obvious use of the hand by Ideye as he controlled the ball and the referee waved play on.
Ideye then blazed over from Ahmed Musa's cross before the breakthrough came in the 23rd minute.
A long ball over the top was brilliantly flicked on by Ideye and Emenike got his toe to the ball first under pressure from two defenders.
Burkina Faso were barely registering as an attacking force, but almost had a penalty just after the half-hour mark when Elderson Echiejile handled, but the referee ruled it just outside and they bungled the free-kick.
They were much improved in the second half and Moumouni Dagano should have levelled in the 49th minute, but totally mistimed his header from Florent Rouamba's cross as the ball rolled off his shoulder.
Substitute Ikechukwu Uche gave himself the chance to kill it off for Nigeria in the 65th minute with a brilliant first touch creating space close to goal, but he then lashed a horrible shot high and wide.
Ambrose's needless second yellow card for an arm across Jonathan Pitroipa gave Burkino Faso hope but Nigeria had the better of the match until Traore's stunning late intervention.
A great one-two set up the move but the chance appeared to have gone as Pitroipa overran it and his cutback missed Wilfried Sanou.
But Nigeria failed to deal with it and Traore rifled home.