Three-year-old Rocco Wright, of Scarcroft, Leeds, was at the pool at the David Lloyd Club in Moortown with his father Steven and four-year-old sister when the tragedy happened on Saturday April 21.
An inquest opening at Wakefield Coroner's Court was told one of the children was due to have a swimming lesson and a discussion was taking place about that when Rocco walked away.
Senior Coroner Kevin McLoughlin said "The little boy wandered off and was found in the deep end of the swimming pool. His father dived in to recover the child."
The inquest opening was told that emergency treatment was started and two doctors who happened to be swimming at the pool attended to Rocco.
Paramedics arrived and Rocco was taken to Leeds General Infirmary.
The inquest opening was told that Rocco, who was born in Leeds on March 29 2015, was confirmed dead at Leeds General infirmary just after 1pm on Sunday April 22.
Coroner Mr McLoughlin said consultant histopathologist Dr Kirsten Hope had carried out a post mortem which indicated that the cause of death "must await further tests."
Mr McLoughlin adjourned the inquest to a date yet to be fixed.
Rocco's father Steven Wright said after the tragedy: “We are all totally devastated by the loss of the most amazing, happy, joyful boy you could ever wish to meet.”
Mr Wright said he was with Rocco and his four-year-old sister at the centre for his daughter’s swimming lesson.
He said he decided to take both children swimming himself after some confusion over the swimming instructors.
Mr Wright said he realised he could not see Rocco. He said: “I checked round the poolside thinking he would be hiding, but devastatingly he wasn’t. I found him at the far end of pool face down at the bottom. I dived in and got him out onto the poolside and screamed for help.”
Police have said they are treating the incident as a “tragic accident”.
David Lloyd Clubs said they were deeply shocked’ and were helping the investigation.