Ennis-Hill became a mother for the first time 13 months ago, and had originally intended for 2015 to be a “transition” year to prepare for the defence of the Olympic title in Rio de Janeiro.
The Briton’s victory followed a dramatic twist in the day’s first discipline, the long jump, when her closest rival, team mate Katarina Johnson-Thompson, scored zero points following three foul jumps.
Ennis-Hill jumped 6.43 metres and threw the javelin 42.51 metres to give her an 86-point lead before the final event, the 800 metres.
She put in a determined display, sprinting past the pre-championship favourite, Canada’s Brianne Theisen-Eaton, down the home straight to win in 2 minutes 10.13sec.
Ennis-Hill, who won the world title in Berlin in 2009, finished with 6,669 points.
Theisen-Eaton, who is married to American decathlon worldrecord-holder Ashton Eaton, repeated her silver medal-winning performance at the 2013 world championships, with a score of 6,554.
The bronze went to Laura Ikauniece-Admidina with a Latvian record 6,516 points.
Having been in contention for gold overnight, Johnson-Thompson finished 28th and last with 5,039 points having been compelled by the rulebook to jog around her 800m in order to be allowed to compete again this week in the individual long jump.
“This time last year I’d just had my son and now I am worldchampion. It’s just an incredible feeling,” the 29-year-old Ennis told reporters.
“It was just a massive surprise just to be here, to be honest. I am really lost for words.
“If I had come here and come away with a bronze medal I would have been so, so happy. To have won the gold is even better.
“This has been the hardest year ever. Going into London (for the Olympics) was hard, with different pressures and challenges in that respect. But this year, juggling all my mummy duties and training. Everything has been so hard.
“But it’s been the most amazing year as well because I’ve got my son and now I’m here on a global stage with a world title again, which is just amazing.” Johnson-Thompson had started the day within 80 points of her older team mate and with strong events to come was reckoned to have a golden opportunity.
But three times she overstepped the plasticine marker on the take-off board for fouls — including a final effort which looked close to 6.90 metres.
“The first one was unfortunate. I hate getting a no jump on the first round because that always puts you in the back foot,” said the 22-year-old from Liverpool.
“The second one was meant to be a safe one, but unfortunately that was a no jump as well.
“At that point, it was all or nothing for me. I had to give it my all. It was just a very slightly margin, but that’s what it is in athletics, I guess.”
(Reporting by Steven Downes, editing by Ed Osmond)