The strike came deep into second half stoppage time and decided a game at the Toronto Stadium that Panama initially dominated before Ghana found their rhythm.
Yirenkyi's winner finished off a counterattack following Panama's push for a late decider.
But their move broke down and Brandon Thomas-Asante charged forward along the left wing and teed up Yirenkyi who scrambled the ball into the net.
"It's what we've practising during our preparations for the tournament," said the 20-year-old who was voted the 2025/26 young player of the year in the Danish top flight.
"Scoring the goal is positive," he added. "But not just for me. There's great support around the team for the young players."
Goal sparks celebrations
The goal sent the Ghanaian supporters wild. And after the team survived a few scares as Panama sought an equaliser, the Ghanaian fans exploded into celebration after the final whistle.
Dozens danced and sang in the rain. Those unable to get close to the initial group of singers and dancers simply launched their own alternative. Those who could not reach that sub set, started another gig. And so it went on.
'A very intense game'
"I feel tired," said the Ghana coach Carlos Queiroz. "That says everything about the game. It was very intense.
"As I said before the match, the wins in this competition are expensive but the players showed they are willing to pay high prices for wins.
"We knew Panama are a wonderful team. They are well organised but step by step I think we started to control the game and put more pressure on them and force them to make mistakes."
Ghana will next play England on 23 June in Boston. England will go into the game as Group L pacesetters after overpowering Croatia 4-2 in Dallas.
Despite the extent of that victory, Queiroz says his players must remain confident. "Football is very competitive at the moment. The days of 5-0 and 6-0 are over," he said.
"There have been so many draws at the World Cup. It shows that the game is quite balanced."
Football history: Jules Rimet, the man behind the World Cup plan
Ghana, who are competing in the World Cup for the fifth time, have not reached the knockout stages since a run to the quarter finals in 2010 in South Africa.
Then the competition was a 32-team event. But with the 2026 event in Canada, the United States and Mexico providing the first 48-team tournament, a last 32 round has been created for the top two from the 12 groups as well as the eight best third-placed teams;


Gunfire at airport in Niger's capital: residents
Tehran and Washington sign interim peace deal to end US-Israeli war on Iran
Why are Kenyan kids burning schools and killing their classmates?
Yirenkyi's late flourish launches Ghana's World Cup party
World Cup 2026: Ghana break Panama resistance with stoppage-time winner
VIDEO: Watch the only community toilet carried away by floods
We don’t owe Tema Motorway contractor any amount of money — Agbodza
Swift response by Saki High Tension residents helps contain warehouse blaze in K...
Bank of Ghana converts 147 rural and community banks into community banks
Five fake soldiers grabbed for armed robbery at Ashanti mining community