For the most part, I agree with you that gates are external. A gate restricts access to a yard, a field, or any outdoor space. There are some exceptions, some of them technical, such as waste gate or sluice gate. But baby gate, pointed out by Haniballl, is the only one I can think of that actually brings a gate inside the house.
I was also thinking of a cell gate in a prison. In movies etc I've heard them called gates and doors, so I'm not sure how you would categorise that.
Got me again