Andre Ayew gave the Black Stars the lead at the Stade Ahmadou Ahidjo but Jim Allevinah's superb 88th-minute strike earned Gabon a point that leaves them in a strong position to reach the knockout phase.
It was a bitter end to the game for the four-time champions, who were furious that Gabon scored after opting not to return the ball when Ghana put it out of play after one of the Gabon players went down injured.
After a shoving match broke out on the pitch at full-time, the referee summoned a Ghanaian back out from the dressing room to brandish a red card.
The player in question appeared to be Benjamin Tetteh, with television pictures showing that he punched Gabon's Aaron Boupendza during the melee.
The result leaves Ghana with just one point in Group C, with Gabon on four and Morocco -- who secured qualification after beating the Comoros 2-0 earlier -- now certain to advance as one of the top two.
Highlights gabon AFCON 2021 Ghana