The Athletic Bilbao forward connected a beautiful cross from Gideon Mensah in the 95th minute to give the Black Stars a solitary win at the Baba Yara Sports stadium.
Jordan Ayew was the first player to shoot on target inside 25 minutes but the goalkeeper of Madagascar dealt with it with ease.
Madagascar looked very comfortable on the ball as they sat deep to catch Ghana on the counter – forcing the first half to end without a goal.
Chris Hughton made two quick changes by bringing in Majeed Ashimeru and Denis Odoi for Baba Idrissu and Alidu Seidu.
The substitutions made Ghana more attacking minded with Mohammed Kudus firing from 20 yards out which was parried away by the goalkeeper.
Inaki Williams had a goal ruled out for offside but Ghana kept pushing until the winner in injury time.
Winger Ernest Nuamah came in for Antoine Semenyo in the 72nd minute and he looked lively and purposeful straight away with some impressive combinations with Mohamed Kudus and Inaki Williams.
Charged by the crowd, Ghana pushed men forward looking to unlock the defence of Madagascar but the Barea nearly punished the Black Stars in the 81st minute but the header came off the upright while the rebound went wide.
Inaki Williams finally found his goal in the 95th after connecting a tailor-measured cross from left back Gideon Mensah.
The Athletic Bilbao forward made no mistake from close range, sending in a powerful header past the goalkeeper to break his goal drought – his first goal in 12 appearances.
Asaase Radio 99.5 broadcasts on radio via 99.5 in Accra, 98.5 in Kumasi, 99.7 in Tamale, 100.3 in Cape Coast and on our affiliates Bawku FM 101.5 in Bawku, Beats FM 99.9 in Bimbilla, Somua FM 89.9 in Gushegu, Stone City 90.7 in Ho, Mining City 89.5 in Tarkwa and Wale FM 106.9 in Walewale
Tune in to broadcasts online: www.asaaseradio.com, Sound Garden and TuneIn
Follow us on Twitter: @asaaseradio995
Live streaming on facebook.com/asaase99.5. Also on YouTube: AsaaseXtra.
Join the conversation. Call: 020 000 9951 or 059 415 7777. Or WhatsApp: 020 000 0995.