The Black Stars garnered seven points from three matches, while Mali also joined them in the last eight after they beat Botswana 2-1 in the other Group D match in Libreville. Mali finished the group phase with six points, while Guinea crashed out of the competition on four points, and Botswana finished pointless.
On Sunday, Ghana will tackle Tunisia in one of the last-eight games, while co-hosts Gabon take on Mali in the other match in Libreville.
Against the run of play, Ghana went in front in the 28th minute through Emmanuel Badu with an unstoppable shot from outside the area. He collected a short corner taken by Andre Ayew and from 20 yards he let fly to give goalkeeper Naby Yattara no chance. It was Ghana's 100th goal at the Africa Cup of Nations.
Left-winger Abdoul Razzagui Camara drew Guinea level in first half stoppage time, though, when his left-footed floater beat Ghana goalkeeper Adam Kwarasey. Guinea were then reduced to ten men when Bah Dioulde was sent off after being booked for second time for a cynical foul on John Pantsil.
Before the late rally by Ghana, Guinea controlled play as they chased an early goal. They were first threatened by the lively Camara after just three minutes. Ibrahima Traore also gave Masahudu Alhassan trouble on the right flank as Guinea stayed on the front foot.
Guinea continued to put pressure on Ghana and on 20 minutes, new Nantes signing Ismael Bangoura's cross from the right was turned away for a corner. Guinea striker Sadio Diallo missed a header and two minutes later, the dangerous Traore put the ball in the Ghana net but his effort was ruled offside.
Ghana launched a late rally in the final minutes of the first half. Ghana's Samuel Inkoom came close to scrambling home a rebound after some determined work by Asamoah Gyan in the closing moments of the first half.
Eight minutes after the break, Kwarasey saved off the feet of Bangoura as the game opened up with both sides no longer hiding their attacking intentions. On the hour, Diallo fired wide off a corner even when he was well positioned inside the goal area as Guinea stayed in the hunt for another goal to no avail.