The gate and gateways of eastern cities anciently held and still hold an important part, not only in the defence but in the public economy of the place. They are thus sometimes taken as representing the city itself. (Genesis 22:17; 24:60; 12:12; Judges 5:8; Ruth 4:10; Psalms 87:2; 122:2) Among the special purposes for which they were used may be mentioned.
As places of public resort. (Genesis 19:1; 23:10; 34:20; 24; 1 Samuel 4:18) etc.
Places for public deliberation, administration of Justice, or of audience for kings and rulers or ambassadors. (16:18; 21:19; 25:7; Joshua 20:4; Judges 9:35) etc.
Public markets. (2 Kings 7:1) In heathen towns the open spaces near the gates appear to have been sometimes used as places for sacrifice. (Acts 14:13) comp 2Kin 23:8 Regarded therefore as positions of great importance, the gates of cities were carefully guarded, and closed at nightfall. (3:5; Joshua 2:5,7; Judges 9:40,44) They contained chambers over the gateway. (2 Samuel 18:24) The doors themselves of the larger gates mentioned in Scripture were two leaved, plated with metal, closed with locks and fastened with metal bars, and you can find more about that here on st-takla.org on other commentaries and dictionary entries. (3:6; Psalms 107:16; Isaiah 46:1,2) Gates not defended by iron were of course liable to be set on fire by an enemy. (Judges 9:52) The gateways of royal palaces and even of private houses were often richly ornamented. Sentences from the law were inscribed on and above the gates. (6:9; Isaiah 64:12; Revelation 21:21) The gates of Solomon's temple were very massive and costly, being overlaid with gold and carving. (1 Kings 6:34,35; 2 Kings 18:16) Those of the holy place were of olive wood, two-leaved and overlaid with gold; those of the temple of fir. (1 Kings 6:31,32,34; Ezekiel 41:23,24)
Main reference: Smith's Bible Dictionary (1860s)
Bible Gallery and Bible Illustrations (thousands of images)