If we interpret Prince Prospero's desire to avoid the terrible disease, the Red Death, as a basic desire to elude death itself, then the masked ball essentially ends with the lessons that one cannot escape or elude death and that it is mistaken pride that leads us to believe that we can. Though his kingdom is in dire trouble, the prince decides to handpick his most healthy and fun courtiers to party with him in a far-away abbey that he owns and outfits to be impregnable. He seems to believe that he is more powerful than death, that iron bolts and chains and gates can keep death away, that his wealth and status provide him the opportunity to do something no human being can do: hide from death.
In the end, then, the prince runs through the series of seven rooms he has designed (rooms which seem to represent the span of a human life, ending with death in the red/black room with the ebony clock -- another symbol for mortality) toward the masked figure that represents the Red Death, and he dies instantly because "Darkness and Decay and the Red Death held illimitable dominion over all." Death is a necessary and inescapable part of life, and no one is immune; therefore, it does hold dominion over all. Despite everything the prince has done to shield himself from death, the ending of the ball (and the story) shows that it simply isn't something we can control, no matter how rich or prosperous we are.