According to the (Disney Canon) "Star Wars in 100 Scenes" book, she died from losing the will to live. Apparently that's a thing you can die of in the Star Wars universe. The book also mentions that the medics are largely incompetent so that may have been a contributing factor towards her baffling diagnosis.
LEAVING MUSTAFAR, Obi-Wan takes Padme to the planet Polis Massa, where
Yoda and Bail Organa are waiting. Medical droids try to save her life,
but their efforts are in vain - she has lost the will to live. The
droids deliver not one baby but twins, and the dying Padme names them
Luke and Leia. Yoda, Obi-Wan and Bail Organa know Anakin Skywalker's
children will be strong with the Force. They must find a way to
prevent them from being found by the evil agents of the new Sith
The Star Wars Episode III: Revenge of the Sith (junior novelization) gives us some additional information from Obi-Wan's perspective
“Medically, she is completely healthy,” the droid said. “For reasons
we can’t explain, we are losing her.”
“She’s dying?” Obi-Wan said, horrified. No, no! He couldn’t take
another loss like this.
But the medical droid bobbed its head. “We don’t know why. She has
lost the will to live.”
I know why, Obi-Wan thought. Anakin has broken her heart.
Obviously this identifies why she lost the will to live, but not necessarily how this resulted in her death.
And in the Revenge of the Sith novelisation, Obi-Wan comes to the conclusion that her death isn't the result of physical damage, suggesting that there's something metaphysical happening to her:
“All organic damage has been repaired.” The droid checked another
readout. “This systemic failure cannot be explained.”
Not physically, Obi-Wan thought.
Unfortunately, he doesn't complete this thought...
The scene in Star Wars : Revenge of the Sith - Illustrated Screenplay has an additional line. Evidently, her "energy" was depleted:
OBI-WAN: You have twins, Padme They need you...hang on.
PADME: I can't...
Padmé winces again and takes Obi-wan's hand. She is holding Anakin's japor snippet.
OBI-WAN: Save your energy.
PADMÉ: Obi-Wan...there...is good in him. I know there is...still...
A last gasp, and she dies. Obi-Wan studies the necklace.
The film's VFX Supervisor John Knoll ascribes her death to "a broken heart"
After Padmé dies of a broken heart, her body is taken back to her home planet for a state funeral
Creating the Worlds of Star Wars: 365 Days
Moving down the canon scale, the Star Wars novel "Coruscant Nights II : Street of Shadows" states that Padme's cause of death (at autopsy) recorded her cause of death as strangulation:
There were conflicting reports, of course, but all the autopsy
reports were in agreement on two things: that she had been strangled,
and that the child had died with her.
But exactly how the former had been accomplished, no one was quite
sure. The evidence of strangulation had been there, and obvious: the
fractured hyoid bone, damage to the larynx, and compression of the
trachea were all clear indications of fatal throttling. But... There
were no signs of bruises on her neck, no scratches or signs of
congestion... no indication of exterior trauma at all. Her throat had
been pristine. It was as if she had somehow been choked to death without
physical contact. And there was only one power in the galaxy that
Typho knew of that could accomplish such a thing.
That being said, in-universe it's made clear that her autopsy has been tampered with and falsified. The results may be incorrect on a number of counts. Out-of-universe this conflicts heavily with the film canon. The medical droid clearly stated that her body was physically healthy whereas broken bones and a compressed trachea would be instantly obvious on even the most cursory of medical inspections, as well as preventing her from speaking.
We also have confirmation from the (now canon 2016 Edition) Star Wars: Character Encyclopedia, which relates that the official reason for her death was that she was attacked by one or more rogue Jedi.
Padme had supported Apailana's bid for election. Although the official
explanation for Padme's death is that she died at the hands of
renegade Jedi, Apailana privately believes otherwise.