Steven Moffat hasn't always been successful as a show-runner of Doctor Who. I've enjoyed his work more than some others have, but it's obvious he's sometimes struggled with keeping it all together. I think he's been done in by modern television's insistence on "seasonal arcs," which is excellent for some shows, but it's something that far too many shows that are ill-suited to it have forced themselves to adopt rather than just stick with standalone episodes and progressing character arcs. (This need for ever-escalating seasonal arcs pretty much killed Burn Notice in its final two seasons, and severely damaged later seasons of Buffy the Vampire Slayer, just to give two examples.)
Part of it is Moffat's own ambition -- he's not satisfied with just dropping a phrase ("bad wolf") or a reference (Torchwood, Prime Minister Saxon) into every episode, he needs there to be a big Rubik's cube of stuff that has to come together with each color on the right side at the end. The problem being, of course, that he doesn't always succeed in that. (The whole impossible astronaut thing, for example, didn't quite come together as well as it should have.) I think the arc in this most recent season worked well in part because it was scaled back somewhat to simply the mystery of one character, as well as paying tribute to the show's history (in its 50th anniversary year) by bringing back an old bad guy in the Great Intelligence.
But Moffat's hit-and-miss ability to manage an entire season's worth of shows has made it very easy to lose track of the fact that, holy shit, the man can write, and when he's on, he's as good or better than anybody at writing a Doctor Who story. He's been responsible for some of the absolute best stories of Who's 21st century iteration, starting with "The Empty Child"/"The Doctor Dances," the high point of Christopher Eccleston's lone season (against some fairly fierce competition, as that 2005 season had really only one or two duds), and continuing to masterpieces like "The Girl in the Fireplace" and "Blink" -- but even before that, there's "The Curse of the Fatal Death," the 1999 comedy piece that managed the neat trick of parodying Who while exemplifying it at the same time, and there's Moffat's very first story in the mythos, a magnificent little short story called "Continuity Errors," which appeared in Decalog 3: Consequences in 1996 (and which is being fiercely bid upon on eBay right now....), which was in many ways the first draft of "A Christmas Carol," the best of the Christmas special episodes (for which the competition is actually not at all fierce as the Christmas specials have mostly been awful).
There are two things that Moffat in particular excels at. One is that he's the only writer of televised Who who makes the time travel an active part of the storytelling. Nine hundred and ninety-nine times out of a thousand, a Who writer will use the time travel element solely as a means to get the Doctor and his companion du jour into and out of the adventure. The TARDIS is treated as a vehicle only, no different from Bessie, the roadster that Jon Pertwee's Doctor used so often.
Moffat, though, often makes time travel part of the story, probably best on display in "Blink" and "The Girl in the Fireplace," but also in the arc of Amelia Pond's first year on the show, Clara Oswald's purpose in the Doctor's life, and the Doctor's entire interaction with River Song from "Silence in the Library" all the way through to "The Name of the Doctor."
But the other thing he is great at is knowing the most important part of the Doctor, and it was perfectly summed up in the phone conversation between the Doctor and the Master in "The Sound of Drums": he chose the name "the Doctor" because he helps people. The Doctor at his heart(s) is a hero, and he always helps people.
One of the hallmarks of the 21st century iteration of the series has been the Time War. We've caught glimpses of it here and there, probably most aggressively in "The End of Time" (one of those mediocre Christmas specials), and it's been such an important part of what's made the Doctor what he is in this version, the thing that's set him aside from the 20th century version.
But it's also really problematic. The Doctor committing genocide twice over is something totally antithetical to what the Doctor is. Indeed, that was the point -- that the Doctor who refused to kill all the Daleks in "Genesis of the Daleks" (with one of his reasons being the good that came from the Daleks' evil, a line echoed by John Hurt in this story when he sees the good that his successors have done in the wake of his destroying Gallifrey), the Doctor who powerfully lamented at the end of "Warriors of the Deep" when surrounded by corpses that "There should have been another way," that Doctor would never kill so many unless he had absolutely no other choice, that there was no other way.
"The Day of the Doctor" is Moffat's way of addressing that without at all negating what happened just before "Rose." The actions the Doctor took were sufficiently problematic that it was etched on every pore of Christopher Eccleston's Doctor, and David Tennant's Doctor still had it etched on every other pore -- but by the time we get to the latter portion of Matt Smith's Doctor, who's been around for some four centuries, he's tried to forget it, to move on. And then in this episode -- set up by both the end of "The Name of the Doctor" and the minisode "The Night of the Doctor" (which you you really need to watch if you haven't) -- we learn that those actions were sufficiently horrible that the Doctor has basically wished the incarnation of the Doctor responsible for them into the cornfield. John Hurt's Doctor's crimes were so awful that none of his successors even are willing to acknowledge that he exists (at least not until Clara had to rescue the Doctor from the Great Intelligence's meddling in his personal timestream).
And then that glorious wonderful ending when Clara does the thing that the companions have always done, from Ian and Barbara all the way through to whoever comes after Clara: reminding the Doctor of humanity. It's the companion who has the perspective, the companion who reminds the Doctor who he is, and that's someone who can use the fact that he's a) 400 years older and b) a time traveller to go back (along with his previous self) to be there for the final moment and fix it. To find that better way that's been staring them in the face since Kate Stewart took them into the secret art gallery. To save the billions of children on Gallifrey, who deserve to live (especially since "Doomsday" established that a mess of Daleks managed to survive the Time War).
He gets to go back and fix it. He gets to save people. Just as in Moffat's first storyline for the 2005 season, the Doctor gets to dance and joyfully cry out that "Everybody lives!" Because the Doctor's job is to make sure that that is the outcome.
And that's why this is the perfect 50th anniversary special. Not because it acknowledged all fifty years of the show, though it did do that, and more, starting with the use of the original opening titles and same opening shot as "An Unearthly Child" in 1963. Not because there were cameos by all thirteen people who will have played the role by the time 2013 ends (thanks to a cameo from Peter Capaldi's eyebrows), though that too was wonderful (not to mention the appearance by a deep-voiced fellow with a big nose). But because it reinforced what the Doctor is about: a person who travels through time and space saving people.