Danforth does not immediately believe that John Proctor's confession of infidelity is honest and true. He suspects that Proctor is attacking Abigail's credibility in order help Elizebeth Proctor avoid the charges of witchcraft.
To test the truth of Proctor's confession and his claims against Abigail, Danforth tells both Abigail and Proctor to turn around. He calls in Elizabeth and asks her whether or not the confession is true. Elizabeth attempts to defend her husband by denying the truth of the confession.
This denial is ironic because John Proctor had already sacrificed his good name, his honor and his pride, by confessing to his affair with Abigail. He made this sacrifice in order to save his wife Elizabeth.
When Elizabeth denies the truth of Proctor's confession to save Proctor's good name, she effectively condemns herself to death, undoing Proctor's work to prove her innocence and by proving his own guilt.