If there's a single Doctor Who story that I can write endlessly about, it's "Genesis of the Daleks". It's a serial that I've written a great deal about already. Not just the story as a whole, but even some of its most important moments, such as the Doctor struggling with the choice of committing genocide.
Having recently watched it again for its 50th anniversary, another moment stood out. Well, many moments stood out - it's an extremely popular story for a reason - but what leaped out to me most was the ending.
For most of "Genesis", the Daleks aren't the biggest threat - Davros is. While the Doctor and his friends had been sent back in time to prevent the Daleks' creation, Davros's intelligence, cunning, and ruthlessness make him an incredibly formidable foe. At this point, while we know how dangerous they'll become in the future, the Daleks themselves are merely Davros's soldiers at best, and his puppets at worst. They follow all of his orders, without question...until the story's conclusion.
Betrayal
In the final scenes of "Genesis", Davros emerges as the clear winner of this story. Not only has he identified and exterminated anyone that even remotely opposed the Daleks. But he's even brought peace to Skaro. After a thousand years of war between the Thals and the Kaleds, he has single-handedly ended it - by wiping out most of both races. In the final scenes, he seems almost unstoppable.
Of course, that's when one Dalek starts to ignore Davros's orders. More than that: it starts to do what's best for the Daleks, not Davros.
The second that this happens, the audience knows where this is heading. While the Daleks seemed to be under Davros's control, it was always inevitable that they would take over. So it comes as no surprise when the Daleks wipe out everyone, including Davros's henchman Nyder, the scientists loyal to Davros, and finally, Davros himself. We then get a fantastic monologue from one of the Daleks, stating that this is "only the beginning".
His own image
This ending would be obvious enough to those even remotely familiar with the Daleks. But honestly, even if "Genesis" was your first ever Dalek story, their betrayal against their creator is still something you'd see coming from a mile away. That's not a criticism. In fact, it shows just how perfect the ending is.
Throughout the entire story, it's pointed out that Davros has made the Daleks in his own image. He believes that they have to be the superior race at all costs. This isn't just because he wants his people to survive - after all, he becomes responsible for wiping out most of the Kaled race!
No, it's because Davros has a clear god complex. It's not enough for him to be responsible for creating a new race. He has to create the strongest, most powerful race possible. For that to happen, they have to be even stronger than him. It's not enough that they should act without pity or remorse - to Davros, those very ideas mustn't exist for the Daleks at all.
An inevitable conclusion
And that's why the ending is so perfect. As I said, everyone could see this ending coming. Everyone except Davros and his followers. You create a race that aims to survive by wiping out all other races - a race that isn't technically your own - and that very creation will turn on you.
The perfect irony of course is that Davros begs the Daleks to have pity - something the Daleks have no concept of. It's not subtle, but it perfectly highlights the difference between the creator and his creation. Davros chose to act without pity, but he was still capable of it. He still had a clear understanding of what it was. Ensuring that the Daleks had no concept of it was the worst mistake he could've made. A mistake that, for this story's ending, at least, seems to cost him his life. (Of course, because Davros was such a brilliant character in his own right, it was just as inevitable that he'd return.)
The ending of "Genesis of the Daleks" isn't surprising, but it is incredibly satisfying. An excellent, perfectly built-up ending that, like the rest of the story, still holds up 50 years later.