Kwesi Donsu scored deep into stoppage time as he rounded Sylvain Gbohouo in goal to slot home from an accute angle.
Earlier in the game Medeama had taken a two goal lead courtesy of goals from Enoch Atta Agyei and Moses Sarpong.
They seemed to be heading for a comfortable Group A win but Jonathan Bolingi and Zambian Rainford Kalaba hit back to restore parity before Donsu's late clincher.
Meanwhile in the other Group A game Young Africans, already out of contention for a qualifying berth, dealt Mouloudia Bejaia of Algeria a massive blow as they beat them 1-0.
The Tanzanian side struck in the 3rd minute through Thabani Michael Kamusoko which means that Bejaia must win against Medeama or face elimination.
In Group B FUS Rabat of Morocco and title-holders Etoile Sahel of Tunisia have already qualified for the next round and meet in the final group game to determine who finishes top of the standings.
Etoile Sahel made light work of Morrocon side Kawkab Marrakech with Mohamed Msakni scoring a brace as they cruised to a 3-1 win.
Rabat still top the group despite being held to a 1-1 draw by Al Ahli Tripolo who were yet to pick up a point going into the match.