Several gates in the surrounding walls of Petra Castellana led into the city. A record from the 18th century mentions three gates : to the south, the east and the west. Only the west gate partially remains, which you probably walked through to enter the site
It was stabilised in 2004. Thanks to studies and archaeological surveys, we know that it was a double gate and that there were a bar to close it. In addition, there may have been a portcullis.
The path you are on is the ‘Tour du Roc’ hiking trail. It most likely follows the main artery of Petra Castellana, the medieval city. In 2019, consolidation work reinforced the dry-stone walls, steps were dug out to make walking up and down the terraces easier and the path leading to the rampart was cleared.