The Mishna on our daf describes how the woman who is accused of adultery and is brought to the Beit HaMikdash to drink the “bitter water” of the sota is first interrogated and encouraged to admit her sin in order to avoid the need to actually carry out the ritual. This is done by assuring her that she should not be ashamed to admit her sin, which may have come under the influence of alcohol, levity, immaturity or bad company. The Gemara explains that they would recount to her stories of great leaders in Jewish history who sinned and then admitted their guilt (such as Yehuda – see Bereshit 38:26).
If she admitted her guilt, she was allowed to go free without participating in the sota ceremony and would not be held liable for her behavior since there were no witnesses to the act of adultery. Still, she would need to accept a divorce from her husband and would not receive her ketuba.
If she insisted that she was innocent, then they proceeded with the ceremony of the sota. The Mishna describes that she was brought to the eastern gate near Sha’ar Nicanor, which was the entrance where the ceremony was held. This was also the place where yoldot – women who were bringing their sacrifices after childbirth – and metzoraim – people who were suffering from leprosy – were purified.
Sha’ar Nicanor is famous because of its beautiful copper doors and because of the miracles that accompanied them on their trip from Egypt. This main entrance into the Temple served a number of purposes, specifically related to situations where a person had to come as close as possible to the azara (inner court) without actually entering it. This was accomplished by arranging that the area of the entranceway would not have the level of holiness of the azara itself.
Thus, the reason that yoldot and metzoraim were brought there is clear – they needed to bring sacrifices, but could not enter the precincts of the azara. The reason that a sota was brought to those gates is less clear. Rabbi Pinchas Epstein, in his Minha Hareva, suggests that the fact that the sota‘s clothing are torn and her hair uncovered is reason enough to have the ceremony done outside the mikdash itself.