A lacklustre, goalless first half led to a remarkable second, which saw Cameroon take the lead three times in between Gambia's first two goals in their history against the Indomitable Lions.
Gambia had dominated the first-half exchanges despite being 80 places below their much vaunted opponents in the FIFA rankings but Cameroon came out strongly after the break with Georges-Kevin Nkoudou rattling the crossbar in the 50th minute and then setting up the opening goal six minutes later for Karl Toko Ekambi.
The 31-year-old Toko Ekambi was a member of the Cameroon side who won the Cup of Nations in 2017 and showed his experience to get his head to a long through ball.
But a sudden burst of attack from Gambia had the Cameroon defence looking jittery and it was no surprise when Ablie Jallow equalised in the 72nd minute with a clever volley as he ghosted late into the box.
Alieu Fadera might have put Gambia ahead soon after but his shot clipped the outside of the post. But they swept into the lead in the 85th minute through substitute Ebrima Colley, who hit a powerful shot after a clever one-two pass with Assan Ceesay.
Cameroon needed to score twice in the remaining time and were level when James Gomez steered the ball into his own net with his outstretched leg as he attempted to clear.
Wooh then grabbed the winner in a stunning conclusion to set up a last-16 meeting with Nigeria in Abidjan on Saturday.
Cameroon dropped Andre Onana, after their 3-1 defeat to Senegal in their previous match, putting Fabrice Ondoa back in goal and while he looked far from assured initially he made several key stops to keep Gambia at bay.
Additional reporting by Reuters.