Max Haigh, of Scarborough, was born with a congenital heart defect in April 2012, and had undergone surgery at Leeds General Infirmary in March 2013 to treat the condition.
But he died in June that year after suffering multiple organ failure, brought on by an infection and heart problems.
The youngster had been taken to hospital on June 9 suffering from sickness, and died three days later.
All children’s heart surgery at the hospital was suspended a week after Max’s operation by NHS medical director Sir Bruce Keogh over concerns about a high death rate at the unit.
Consultant paediatric cardiologist Dr James Bentham, who examined Max before he died, told the inquest that in his opinion the youngster’s death was not linked to surgery at the hospital.
Dr Bentham said: “Max had undergone surgery on March 18 that was very complicated. It was always going to be a difficult procedure.
“We were managing Max’s condition with paedriatrics. We were assessing to see how the cardiographic condition was contributing to the illness.
“Max had been vomiting and was a little more sleepy and upset than we would have expected.
“In our opinion that we were dealing with sepsis and infection affecting the body and possibly the brain.
Assistant Coroner Philip Holden asked Dr Bentham: “One of the concerns the family has is that medical staff were giving too much consideration on the brain and not enough on the heart?”
Dr Bentham replied: “Our feeling was that Max had come down with a viral sepsis infection.
“Vomiting and lethargy would have been unusual for a problem with the heart.
“There was an abnormally high white cell count that would keep in with an infection.
“The performance of his heart was assessed as good. Our overall assessment was that we had re-hydrated Max too much that had caused too much blood to flow to the lung which had caused breathing problems.
“It is a very, very difficult situation to manage when you have a heart that is doing two jobs and when children have another illness it makes it a very difficult situation.”
The court heard that Max had undergone a heart scan on May 29 where his heart was at a normal size, but it had enlarged by time he had arrived at hospital on June 9.
The coroner asked whether the enlargement of the heart over the previous fortnight was a cause for concern.
Dr Bentham said: “The change in that space of time would cause concern.”
Dr Peter Ellis, representing Max’s parents Emma Melton and James Haigh, asked Dr Bentham if as a result of scaring that occurred to Max’s heart during surgery and being under bypass meant his heart had “very little chance of surviving infection”.
Dr Bentham said it was a “potential” but didn’t think it was “likely” that Max would have little chance of surviving infection as a result of his heart surgery.
Dr Bentham said: “After looking at this heart on June 11 I am really surprised the events on June 12 happened.
“There was no impression on June 11 that this heart was struggling to that extent.”
Asked whether operating on Max’s heart was the best option available Dr Bentham said:”It was possible to repair Max’s heart but it is not possible to say if it would be successful until you operate.
“The best approach is trying to go for gold and to repair the heart.
“The treatment Max received was the best he could have received in any heart centre in the world.”
The inquest, due to last three days at Wakefield Coroner’s Court, continues.