A second-half substitute, the Ghana international spared the Jack Army's blushes with a 60th-minute equaliser to ensure a 1-1 home draw in the matchweek 13 fixture at Liberty Stadium.
Ayew started from the bench owing to his lack of full fitness after picking up an injury while on international duty with Ghana earlier this week. The game marked his return to action.
“It was brilliant, and we needed him tonight,” said Cooper of the goal, reports his club's official website.
“We have drawn a game at home, and we are frustrated we have not got all three points.
“But, on the basis that we did not play well in the first half and were playing a team showing good resilience, we needed someone like Andre to get us back in the game.
“He gave us that and we were grateful to have him back on the pitch.
“He could not have started, but he insisted he felt he could play a part. He is experienced and knows his body.
“The medical team did a great job with him, we had a joined up approach and hopefully he is good to go.”
Adam Reach put visiting Sheffield in the lead on the 27th-minute mark after being set up by Barry Bannan.
With Swansea unable to find an equaliser before half-time, Cooper threw on Ayew for Liam Cullen during recess.
The Ghanaian did not disappoint as he outwitted two men before curling a sweet shot over and beyond the goalkeeper.
The 30-year-old, who has four goals in his last two international appearances for Ghana, has made it six goals in 12 league outings, standing as the club's top scorer so far this term.
He is continuing just where he left off last season where he netted 16 times in 46 matches to inspire Swansea to the semi-finals of the Championship play-offs.
His efforts won him the top scorer and most valuable player honours at the club's End of Season Awards gala.