From Tolkien Gateway

The Undergate (also called the under-gate) was a gate with brazen doors that blocked the entrance from the underground side passage that was called the Under-way to the ground floor of the Tower of Cirith Ungol.[1][2]

When Frodo and Sam first encountered the Under-way they were in darkness and only perceived that the way was blocked. After Frodo had been stung by Shelob[3], orcs found Frodo and carried the unconscious Frodo through the Under-way and through the Undergate to the Tower of Cirith Ungol. Sam followed the orcs on the Under-way, but was unable to get through the locked Undergate and was forced to go back to the main tunnel in Shelob's Lair.[2]