The nerveless Hammers attacking midfielder stepped up to convert the spot kick after his brother Jordan had scored the first.
Ayew has performed well at the tournament after suffering a stomach bug. Ghana now play Cameroon next Thursday in Franceville for a final place.
It will be a sixth consecutive semi-finals appearance for four-time champions Ghana, who were runners-up in 2010 to Egypt and in 2015 to the Ivory Coast.
They overcame DR Congo without captain and striker Asamoah Gyan, who failed to recover from a thigh injury sustained in a group loss to Egypt four days ago.
“We corrected some mistakes at half-time and were a totally different team in the second half,” Ghana coach Avram Grant told SuperSport.