Why does Atticus consider Mrs. Dubose a "great lady"? How does this fit in with his explanation of why he is defending Tom Robinson?
Atticus considers Mrs. Dubose a "great lady" for her courageous insistence on breaking herself free from her addiction to painkilling drugs, even though the end of her life was quickly approaching, and even though the process was painful. No one told Mrs. Dubose to do this: she took up the task on her own, enduring the excruciating and undignified fits that accompanied her body's withdrawal from the drugs.
Mrs. Dubose's willingness to fight for something worthwhile, something at the root of her own principles, is recognized and appreciated by Atticus. More than that, Atticus identifies with her struggle. He knows that he can't win Tom Robinson's case. Further, he knows it'll be difficult and dangerous. But he takes up the case anyway, and does his best, because it's the right thing to do. Tom is clearly innocent, and his only chance for survival is depending on a capable lawyer like Atticus. Yet the racist townspeople reject Atticus and even his children for his willingness to defend Tom, showing more and more hatred to them as the story unfolds. Like Mrs. Dubose, Atticus is willing to exert courage and effort in the face of nearly-certain failure in order to take a stand for what matters.
Recall from Chapter 9 that Atticus told his daughter: "Simply because we were licked a hundred years before we started is no reason for us not to try to win." He's explaining his belief that we must fight for what matters, even if we're certain to lose. Later, toward the end of Chapter 11, Atticus is trying to explain to Jem why Mrs. Dubose is a "great lady." It's because she's courageous and determined. Here, Atticus's words echo those he used earlier with Scout:
"It’s when you know you’re licked before you begin but you begin anyway and you see it through no matter what. You rarely win, but sometimes you do. Mrs. Dubose won, all ninety-eight pounds of her. According to her views, she died beholden to nothing and nobody. She was the bravest person I ever knew."