Homicide detectives in Western Australia are investigating the death of a baby boy.

The 13-month-old was initially taken to the Narrogin Hospital in WA's Wheatbelt in October last year with serious injuries.

He was transferred to Princess Margaret Hospital before being discharged at a later time.

A 25-year-old man, who police said was known to the child, was charged in March with causing aggravated grievous bodily harm.

He pleaded not guilty and was released on bail.

Police have confirmed the child died on Sunday, with homicide squad detectives attending a home in Golden Bay near Mandurah.

Premier sends sympathy to family

WA Premier Mark McGowan extended his condolences to the baby's family.

"It's a very tragic situation," he said.

"I will seek to find out what is going on but it is tragic and no doubt the family is feeling it keenly. The death of any child is a shocking thing.

"We will let the police do what they are required to do and no doubt the Minister for Community and Development will be watching this closely."

The police investigation into the baby's death is continuing.