The central drama of the story is Ivan's struggle with illness and death, and Tolstoy gives us quite the setup. He tells us Ivan's whole life story up to the point when he becomes sick. We get to know Ivan, his habits and desires, his family and friends, and his circumstances. The opening chapter – even though it technically occurs after Ivan has already died – also serves as setup. It gives us a more vivid (and unflattering) picture of what the people in Ivan's social world are like. Also we get an idea of what Ivan himself was like before he got sick, since Peter Ivanovich and his friends are a lot like Ivan used to be.
Ivan's fall while putting up the curtains is what causes the whole mess that follows. That's when he injures a critical organ (appendix, kidney?) and starts to show signs of illness. As he grows sicker, Ivan's mood and attitude toward life begin to change dramatically. He starts having to struggle with fear, discomfort, and isolation. This marks a shift for a man used to having an always pleasant life. Still, he's hopeful at first that the doctors can get rid of whatever condition it is that's bothering him and restore life to normal.
The doctors' treatments don't work. Ivan's been afraid that his condition might be serious since the beginning, but it takes a while for it to hit him that he might actually die. This happens in one intense moment of realization, when he stops thinking of his condition in medical terms and starts thinking about it in terms of life and death. From this point on, the character of Ivan's struggle changes, as does the tone of the story. Everything is much more serious. The problem for Ivan is no longer finding a way to recover (although at moments he still falls back to this way of thinking); it's understanding and reconciling himself to the inevitable, death.
The climax, like the complication, is another moment of realization that brings about a pivotal change in Ivan. It's the moment that Ivan listens to "the voice of his soul" (9.13) for the first time, and becomes uncharacteristically reflective. He actually tries to figure out why he wants to live, and realizes the very life he's been wanting to go back to all this time has been not so great. Perhaps he hasn't lived his life as he should. The rest of the story revolves around his struggle to accept that yes, he has lived his whole life in the wrong way. Does this climax predict the end? Not exactly, since it's far from clear that Ivan will reach the right conclusion, but it is encouraging that he's finally asked the right question. And the end is actually prefigured here with that image of the black sack, which happens again right before Ivan dies.
After Ivan's climactic realization, his waking life is defined by one thing: suffering, and lots of it. He's more alone than ever before, he hates his family more than ever before, his pain is worse than ever before. And now he's got to cope with the possibility that maybe his whole life was a failure. No wonder he starts screaming non-stop those three last days. But he has at least finally stumbled on the thing he needs to recognize: his life was wrong. Will Ivan be able to accept the truth about his life? Will he be able to discover what all of this actually means and reconcile himself to death? Will the story have a happy ending?
So here's Ivan back in that black sack from the climax, falling through and not reaching the bottom. Then, suddenly, almost miraculously, he's "struck" by something and sees the light (literally). It's the final moment of realization, and the one that brings everything to a conclusion. Ivan now sees that his life was wrong. For the first time he feels compassion for his family, and recognizes that by dying he can at last do them a service. Now he's ready to die, and even happy to do it. No more tension.
Judging from Ivan's own state of mind, he's perfectly calm and perfectly happy as he dies, though that's not how it appears to the people around him. Just when it looks like he's about to go, he proclaims, "Death is finished." Readers are left with the task of agonizing over what Ivan means. And then he's gone.