Mame Biram Diouf was fouled in the area and Fenerbahce striker Sow kept his cool from the spot to net a 64th-minute winner in Casablanca on Friday.
Senegal, who face a tough test to qualify from a group that features Ghana, South Africa and Algeria, meet Guinea in their final friendly on Monday before the tournament begins in Equatorial Guinea.
Gabon will hope to recover from their first loss in seven matches when they tackle Mali on Sunday.
Jorge Costa's men get their AFCON campaign under way against Burkina Faso on January 17, before meeting Congo and the hosts.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.