Najiyah Hussain, of Manor Park, east London, died after being given laughing gas instead of oxygen.
After the inquest, consultant Andrew Hobart and the child's father, Akmul, hugged outside the court.
The Walthamstow coroner, Dr Elizabeth Stearns, recorded a verdict of accidental death.
Najiyah had been taken to the accident and emergency department at Newham General Hospital in east London when she went into convulsions after receiving a flu jab in January last year.
Mr Hobart, 37, was the most senior doctor on duty in the casualty department.
He gave her a mask to help her breathe, but instead of being given oxygen, she was mistakenly fed the anaesthetic nitrous oxide.
Her brain was starved of oxygen and she died in intensive care.
At the inquest Mr Hobart sobbed as he turned to the family and apologised.
'Heard the truth'
"I am so sorry. I know I made a mistake, that mistake resulted in the death of your daughter.
"I take full responsibility for that. There's nothing I can say that can bring back Najiyah, I'm so sorry."
After the hearing, Mr Hussain said: "I've forgiven him. He said it was a mistake and we all agreed it was a mistake so we will take it in that way.
"I believe that we heard the truth today."
Mr Hobart stated in his police interview after the incident that he had inadvertently turned the "wrong knob" on an anaesthetic unit called a Boyles machine.
He had been suspended immediately afterwards and a hospital inquiry was held.
Mr Hobart will undergo a period of supervised practice before returning to work at the hospital.
Old equipment
The inquest heard the equipment used to administer oxygen was 17 years old.
But the court was told that measures had since been introduced to prevent a repeat of the mistake.
In July last year, Chief Medical Officer Professor Liam Donaldson ordered hospitals to fit equipment with an alarm, which warns doctors if the amount of oxygen is below 20%.
The Crown Prosecution Service decided in December last year that Mr Hobart's behaviour did not amount to gross negligence.