The official said a post mortem had established that the singer suffered a pulmonary oedema, an accumulation of fluid on the lungs.
This would appear to confirm speculation that Mr Gately, who died after a night on the town on the island, choked on his vomit.
At a brief court hearing in the island's capital Palma, a judge said that Mr Gately's body could be taken home.
The 33-year-old was found dead on Saturday. He was discovered on the sofa in his apartment in Port Andratx after a night out partying with his partner Andrew Cowles.
A sample of pulmonary fluid taken during the post-mortem will be sent to a forensic laboratory in Barcelona for further tests to confirm the result, the court official said.
Investigation
The official added that the investigation into the death will continue as a formality with Mr Cowles and one other person declared as official witnesses.
The second witness is thought to be Bulgarian Georgi Dochev, 25, who went back to the apartment with Mr Gately and Mr Cowles after their night out and has described finding the singer's lifeless body the next day.
Lawyer Gerald Kean, a spokesman for Mr Gately's family in Ireland, said papers have been signed to allow the release of his body.
But he said it may be two days before it is returned to Ireland.
“The family's only wish is to get their son and brother home as soon as possible,” Mr Kean said.
The lawyer said a number of formalities remained to be completed before Mr Gately is repatriated.
Tweet

Showing comments 1 to 1 and replies | View All
Wes Brown (13/10/2009 at 17:12)
Probably a good time for the medics to let us know the symptoms and signs of a pulmonary oedema are. I'm sure most men can't even remember when they last visited their GP - if at all!