The gatehouse is a house like spot where someone can lower
or raise the portcullis. They are a look out for enemies and to see if they have to let people in or out the castle.
The most important part of a castle as far as its defense was concerned, the entry being the weakest point. Older ones were little more than a strong arch with heavy iron-bound wooden gates and drawbars and a guard chamber on top or to the side. Later on, flanking towers were added to the gateway, and Portcullises and Drawbridges. Where as the Keep was a passive defense, the gatehouse was right up in front, and became the most important part of building in the later castles.
we got this picture from www.castlexplorer.com