This is the entrance to the Kings School, one of the oldest schools in the country. It's also a way into the Cathedral but you need a pass to get through the gate.
Turn right to go up Palace Street, behind you is the Kings School Shop.