Torvald wants to know, in the end, how he has "forfeited" his wife, Nora's, love. She declares, "It was this evening, when the miracle did not happen; for then I saw you were not the man I had imagined." She believed, when Krogstad's letter was in their mailbox full of the information that would expose her deception to her husband, that Torvald would read it and "never [...] think of submitting to that man's conditions" to remain quiet. Nora believed, absolutely, that Torvald would tell Krogstad to "'Make it known to all the world,'" rather than try to cover up what she had done and submit to this unscrupulous man's blackmail attempt. She thought that, in the end, Torvald would have taken the responsibility on himself and declare his own guilt. She says that she would have protested against his sacrifice -- essentially that they would have tried to save one another, and that they would each have done the most loving thing possible by trying to protect the other partner. Nora both "hoped for and dreaded" this miracle, likely because it would have shown how much her husband loves her (as she loved him) but also because it could have spelled their mutual ruin. Nora believed that Torvald loved her enough to sacrifice for her, as she had sacrificed for him, but her hopes were dashed by his cruel and compromising response to Krogstad's letter.
The miracle Nora hopes for "in terror and hope" is for her husband to change and accept responsibility. She had previously forged a letter to the bank in order to save him from crippling debt. He inevitably discovers the letter. Nora hopes that he will "step up" be a man, and realize that he had ignored their situation, both personally and financially, and assume responsibility. Here is an excerpt from the scene in Act 3:
Nora: When Krogstad's letter was lying out there, never for a moment did I imagine that you could give in to this man's terms. I was so absolutely certain that you would say to him: go on, tell your tale to the whole world. [And when that was done...
Helmer: Yes, what then? When I had exposed my wife to shame and disgrace?]*
Nora: When that was done, I was so utterly sure, that you would step forward and take everything upon yourself, and say: I am the guilty one.
Nora: You think that I would ever have accepted such a sacrifice from you? No! Οf course not. But what would my assurances have been worth against yours? That was the miracle which I was waiting for, in terror and hope. And it was to prevent it, that I wanted to kill myself.
Nora is waiting for Helmer to defend her honor in the face of Torvald's accusations in the letter. Sbe believed that it would have been a miracle if her husband protected her. Instead Helmer reacts violently toward the Nora after reading the letter, setting up the final scene of the play where Nora tells Helmer she does not believe in miracles any more and leaves him, letting the door slam.
Remember that the play is a translation. The use of the word "miracle" is not always considered the most accurate translation of the Norwegian although it is is the most common translation in English. The original phrase meant something more similar to "wonderful thing" something that could happen rather than the "miracle" connotation of something that is unlikely to happen.