After a four-month missing persons inquiry, his remains were found at two nearby cemeteries.
Crown prosecutor Barnaby Hawes told the jury this morning in his opening address that Gosnell had "severely assaulted" Hayden at a city flat on August 22.
The next day he "began a process of dismembering Hayden Miles's body" before cutting him into 12 parts, Mr Hawes said.
He then dumped the body parts at two city cemeteries nearby, he said.
Defence counsel Craig Ruane said his client does not deny the assault, which ultimately led to Hayden's death.
But Mr Ruane said Gosnell did not mean to kill the teen, and he should be convicted of manslaughter - not murder.
The jury has to decide whether Gosnell intended to kill Hayden during the assault, and the defence position is, he didn't, Mr Ruane said in his short opening address.
Mr Hawes said what was crucial to the case, is what Gosnell was thinking at the time of the assault.
In a police interview, Gosnell said he did not intend to kill Hayden, Mr Hawkes told the court.
He said the assault started after Hayden had been drinking at a Cashel Street flat where his friend Nicolette Vaux-Phillips lived with Gosnell.
The trio had run out of booze, and it was decided they would steal some from a nearby Linwood supermarket.
The court heard that Hayden had stolen a cask of wine, but while he was away, Gosnell bumped into a friend and the pair plotted to rob the younger man of his iPod.
Hayden was then jumped, his iPod, wine and a cellphone were stolen, and he was assaulted, Mr Hawes said.
Upset, Hayden had met a woman on the street, and asked to use her phone.
He phoned his mum, told her he had been robbed, and returned to the flat.
Hayden spoke to Vaux-Phillips, and told her that Gosnell was only using her for money.
Gosnell then attacked him, the court heard, and proceeded a brutal and prolonged attack on Hayden, inside and outside the flat.
Witnesses said he repeatedly kicked and punched Hayden who did not fight back, Mr Hawes told the court today.
Vaux-Phillips - who was last year sentenced to 12-months' home detention after admitting a charge of being an accessory after the fact to culpable homicide - told police Hayden's face and arms, as well as Gosnell's shoes, were covered in blood.
Once the prolonged assault ended, Hayden was "breathing funny", like he was running out of air, she told police.
Mr Hawes said Hayden was dumped on a couch, and Gosnell and Vaux-Phillips went to bed.
The next morning, he was dead.
Gosnell, who would later tell police he "couldn't stop" while he was bashing Hayden, then set about dismembering the body, the court heard.
He transported the body parts in rubbish bags and a backpack to two local cemeteries and dumped them in recent burial plots, Mr Hawes told the court.
Gosnell, and Vaux-Phillips, then tried to cover up their tracks, Mr Hawes said.
They were arrested in December and the body parts were found.
Hayden's DNA was found at the flat and Gosnell was charged with murder.
The trial, before Justice Lester Chisholm and a jury of six men and six women, continues this afternoon.