About to be trapped
What a horrible feeling it must have been - to walk through that gate and know that the door was going to come down - and trap you inside.
Emotions, according to Nathaniel Branden, are "instantaneous psychosomatic responses to value judgments."
In other words, what you experienced before will determine your reaction to a new event.
If you belong inside the castle, the door coming down provides safety. If you are being imprisoned within it - as in The Tower of London - that same door coming down, portends doom.