What is the meaning of Gatehouse?

A lodge besides the entrance to an estate; often the residence of a gatekeeper; also a dwelling formerly used as such a residence.

A fortified room over the entrance to a castle or over the gate in a city wall

A shelter for a gatekeeper.

Source: wiktionary.org