In the "traditional" medieval castle, there was a moat, with drawbridge, and then a portcullis behind that. The portcullis (gate) is necessary because you can't get in our out without lowering the drawbridge, which in effect "opens" the front door.
The portcullis could be "dropped" in a hurry by cutting the ropes or tripping the catch on the winches, and believe me, you don't want to be under it! But getting it back up was another deal entirely.
The "sally port" is a smaller (walk through size) door set into the portcullis to allow a single person or small group to go in or out of the castle, without having to raise the portcullis, thus exposing the interior to the "other" side's attack (a charge by mounted nights across the drawbridge is why all this exists in the first place.
The term can also refer to the "space" between the outer portcullis and an inner one. It was common in some designs to put a room above this space, with holes (called "murder holes" in the floor. If they didn't like you, they left the outer portcullis up, but closed the inner, then invited you in. THEN they dropped the outer and used the holes while you were trapped.
Most modern jails have normal doors for pedestrian traffic to the admin side (the front door), but bring prisoners through the back way - the sally port. They're really referring to the bit with the double portcullis (just normal doors today) - the "murder hole" area, although the original term is for the smaller door in a larger door.
The modern "proper" usage would be the auto shop that has one or more overhead doors, and then a 36" door for foot traffic, just so you don't have to open an overhead for a pedestrian, but no one in that business calls them sally ports. The term has come to mean the double set of doors with a vestibule between them, usually for temperature control (the "airlock" effect at most malls) or security (as in at the jail). They can be sized for foot traffic or for anything up to big trucks. Penitentiaries often have double fences/gates at their service entrance that can handle an 18-wheeler (or a prisoner bus).