A hospital spokesman said: "We would like to extend our honest apologies to Esme Thomas and her family, and to all our patients who have had to spend much longer in A&E than normal waiting for a hospital bed".
The hospital has apologised to Esme and her family and stressed it is under "extreme pressure" due to a huge increase in the number of "very ill" patients it is treating.
Thousands of patients are waiting in ambulances for hours as the hospitals lack adequate space.
It comes as official figures released today show the NHS ended the year with the same A&E waiting time performance level in December - 85.1 per cent - as at the start of the year, equalling January's record low and the worst result since the target was introduced in 2004.
A Scottish Ambulance Service spokesman said it had experienced an "exceptionally high level of demand" in the first week of the year, with a 44 per cent increase in immediately life-threatening incidents.
The Gazette also reported yesterday how so-called bed-blocking - when patients are well enough to leave and want to do so but can not due to a lack of social care provision - is adding to the strain on hospital wards.
We acknowledge that our Trusts and local CCGs are doing everything they can to create capacity and more beds in the short term, and we are grateful to them for their continued assistance in such a time of crisis.
Capacity at NHS hospitals has been stretched more than ever over Christmas with fewer beds available across England, despite the Prime Minister claiming extra funding and extensive planning meant it was better prepared.
The higher flu rate in Scotland means the health service here is under greater pressure than the rest of the United Kingdom, she added.
Tom Wilson, from Newtongrange in Midlothian, lay bleeding for more than three hours as he waited on an ambulance - and then spent 13 hours on a trolley in a corridor in A&E.More news: 'Black Panther' sets Marvel record with advance ticket sales
Leonard raised Mr Wilson's case to the First Minister after his son wrote to the health secretary earlier this week.
"That is an 80-year-old man with underlying health conditions waiting more than sixteen hours for treatment". We will do our best to keep you anonymous.
Ms Sturgeon responded: "What I say to Mr Wilson is very simple, I say sorry to Mr Wilson if that was his experience of the health service".
Staff at the hospital seemed "overwhelmed" and "deeply hurt" that patients were having to wait outside, she said.
She said Mr Wilson's case would be looked into but added that A&E demands over the festive period were "unprecedented".
Scottish Liberal Democrat leader Willie Rennie called the problems "largely predictable" and said they were down to "Nicola Sturgeon's failure to do her job over the last ten years".
When she arrived, she said she had to wait in a queue for four hours before doctors could see her.
The letter signed by 68 consultants in charge of A&E at 68 hospitals in England and Wales said staff are trying their best to cope with the current crisis facing the NHS.
"We're 800 Global Positioning System short - that's her responsibility - 3,000 Scots are waiting for mental health treatment - that's her responsibility".
Scottish Labour leader Richard Leonard said Sturgeon had been "found out" on her stewardship of the NHS.