The Black Gate was built by Sauron to defend his realm, Mordor, from an invasion from the north. It guarded the only entrance to Mordor from the north.
It was protected by magic as well as orcs. In the Second Age, the Last Alliance of Elves and Men breached the Gate and went on to Orodruin.
Toward the end of the Third Age, the Rangers of Ithilien who were ordered to scout by Faramir dared to come within its sight but no farther.
Here was the site of the last battle in the War of the Ring.