mid-15c., from Latin ingressus "an advance; walking; an entry," from ingress-, past participle stem of ingredi "to step into, enter," from in- "in" (from PIE root *en "in") + gradi "to step, go" (from PIE root *ghredh- "to walk, go"). The verb meaning "to enter, go in" sometimes said to be American English, but it is attested from early 14c.
Meaning "to close by folding or bringing together" is from mid-14c. Meaning "prevent ingress and egress" is from mid-14c. Sense of "to set (someone) free (from)" (c. 1500) is obsolete except in dialectal phrases such as to get shut of. To shut (one's) mouth "desist from speaking" is recorded from mid-14c.