Ba leaves it late to conquer Cameroon
The match was heading for a draw when substitute Ba collected the ball at the edge of the penalty box and shot past goalkeeper Carlos Kameni, sending the capacity crowd into raptures.
After a 1-1 draw at home to the Republic of Congo, the defeat leaves Cameroon with just four points from three games.
Senegal top the group with nine points from three matches and boast the best attack with 12 goals.
Cameroon, playing with top striker Samuel Eto'o on the flank and Achille Webo up front, created plenty of chances but were unable to convert.