He admits the beating led to the schoolboy's death, but his defence team argues he should be convicted of manslaughter, not murder, because he did not intend for Miles to die.
Hayden was reported missing after going to see his friend Vaux-Phillips at the Linwood house she shared with Gosnell. His remains were found after a four-month missing persons inquiry.
Today, Vaux-Phillips, a 19-year-old mum-of-one, continued her evidence on day two of the trial.
During the attack in the flat's lounge, Gosnell punched and kicked Hayden repeatedly, she says.
He also laid Hayden on his stomach, sat on his back, and bent his arms and legs back.
"He was trying to break them," she said.
"He (Hayden) was groaning, telling him to stop."
Yesterday she told how she had invited Hayden around for drinks.
When they ran out of bourbon, they decided to steal some from a nearby supermarket.
But while Hayden was stealing a cask of wine, Gosnell bumped into a friend and the pair plotted to take the younger man's iPod.
While walking home, Hayden was jumped from behind and his iPod, cellphone and the wine were stolen, Crown prosecutor Barnaby Hawes said.
Upset, Hayden used a stranger's cellphone to ring his mum and tell her he had been robbed. He then returned to the flat.
Gosnell said Hayden "shouldn't have come back" and told him to leave, Vaux-Phillips said.
He started his attack on Hayden after the teen riled him by saying Vaux-Phillips was using him and didn't like him.
Gosnell repeatedly punched and kicked Hayden's head and body, saying he "deserved it", Vaux-Phillips said.
Gosnell made him clean himself up three or four times before laying into him again.
Hayden begged for Gosnell to stop and for his female friend to help him.
The attack only ceased when an unconscious Hayden was "breathing funny", like he was running out of air, Vaux-Phillips said.
After showering him, Gosnell laid Hayden naked on the couch and went to bed with his girlfriend.
In the morning, Vaux-Phillips checked Hayden for a pulse and couldn't find one.
"He was dead," she told the court. "I told Gavin he was dead ... he just carried on walking outside."
The next day, Gosnell dismembered the body with a jigsaw, she said.
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 - was then told to clean up the bloodied mess.
Gosnell threatened to "do the same thing" to her if she refused, the court heard.
The next day, they dumped the body parts in two fresh burial plots in nearby Ruru Lawn Cemetery and Memorial Cemetery.
Organs were buried in the backyard, while clothing, towels, tarpaulins and the jigsaw were burnt, the court heard.
Gosnell and Vaux-Phillips then tried to cover their tracks. After dumping the body, Vaux-Phillips posted a message on Hayden's Facebook page asking if he got home okay.
Today, Vaux-Phillips told how her and Gosnell fled to Dunedin after disposing of the body.
A warrant was out for her arrest and she wanted to go.
They caught a bus and stayed roughly two weeks before returning to Christchurch.
Asked by Mr Hawes if her and Gosnell had discussed what they would say if they were questioned over Hayden's disappearance, she said they had.
"He (Gosnell) said to say Hayden had come round that night. He'd been beaten up and was gone in the morning when we woke up."
They were arrested in December.
The trial, before Justice Lester Chisholm and a jury of six men and six women, continues.