A four-year-old boy with suspected pneumonia was was forced to sleep on a hospital treatment room floor because of a lack of beds.
Jack Williment-Barr was photographed lying on a pile of coats and breathing through an oxygen mask at Leeds General Infirmary (LGI) on 3 December.
His mother, Sarah Williment, told The Daily Mirror seeing the NHS crisis for herself meant she would vote Labour.
The hospital apologised and said it had had its busiest week since 2016.
'Only chairs available'
Dr Yvette Oade, chief medical officer at Leeds Teaching Hospitals NHS Trust, said: "Our hospitals are extremely busy at the moment and we are very sorry that Jack's family had a long wait in our Emergency Department."
She added: "We are extremely sorry that there were only chairs available in the treatment room, and no bed. This falls below our usual high standards, and for this we would like to sincerely apologise to Jack and his family."
Jack was taken to his GP last Tuesday, with vomiting, diarrhoea, coughing and a fever. He had been ill for six days with what the GP had thought was a virus, but as he had not improved he was taken by ambulance to the accident and emergency unit of LGI.
Mrs Williment told The Mirror: "He kept asking to lay down. He was without a bed for four-and-a-half hours.
"He needed to go to sleep and he needed to lay down. He started falling asleep and he ended up going to sleep on a pile of coats.
"There was no bed for him in A&E and there was no bed for him on the ward, so he just had to sleep on the floor."
After his wait in the treatment room, Jack was eventually moved to a ward where he waited for five hours on a trolley before a bed was found.
He was later diagnosed with flu and tonsillitis, and discharged home the next day.
Mrs Williment praised medical staff but said: "I am frustrated about the system and the lack of beds, which I am presuming is due to a lack of funding to the NHS to deliver the services that are required."
The prime minister had faced calls to apologise to the family from shadow health secretary Jonathan Ashworth.
He said: "Boris Johnson should personally apologise to Jack and his family. A decade of Tory cuts has brought us to this crisis in our NHS.
"If the Tories win on Thursday, patients including children will suffer five more years of this. We need a Labour government to save our NHS."
Asked about the incident during an interview on LBC, Mr Johnson said: "Of course I sympathise very much and I apologise to everybody who has a bad experience.
"By and large I think the NHS do an amazing job and I think that they deserve all praise for the service they provide - but they do need investment and that's why we're doing it now."
Liberal Democrat Luciana Berger said: "This young boy's experience is absolutely shameful and deeply upsetting. It is simply unacceptable that hospitals are under so much pressure that they don't have enough beds - especially for small children."
Mr Johnson was later asked about the photograph in an interview with ITV News political correspondent Joe Pike, but refused to look at it.
Instead, he took the phone from Mr Pike and put it in his pocket.
In a clip of the interview posted on Twitter, Mr Pike said to Mr Johnson: "You refuse to look at the photo. You've taken my phone and put it in your pocket Prime Minister."
Mr Johnson then took the phone out of his pocket, looked at the photo on the screen, and said: "It's a terrible, terrible photo. And I apologise obviously to the families and all those who have terrible experiences in the NHS."
Use the search box below to find your constituency and the candidates who are standing.
Or you can browse the A-Z list.