I commend you for looking for Biblical answers pertaining to Ezekiel 38-39. I have been to Israel and I assure you that it has walls, gates, and bars as shown in the attached pictures that I took there in March of 2008. Interestingly, the Hebrew word translated “villages” in the passage above is found only 3 times in the OT. The other 2 passages are quoted below:
Esther 9:19
Therefore the Jews of the villages who dwelt in the unwalled towns celebrated the fourteenth day of the month of Adar with gladness and feasting, as a holiday, and for sending presents to one another.
Zechariah 2:
1 And I lifted my eyes and saw, and behold, a man with a measuring line in his hand!
2 Then I said, “Where are you going?” And he said to me, “To measure Jerusalem, to see what is its width and what is its length.”
3 And behold, the angel who talked with me came forward, and another angel came forward to meet him
4 and said to him, “Run, say to that young man, ‘Jerusalem shall be inhabited as villages without walls, because of the multitude of people and livestock in it.
5 And I will be to her a wall of fire all around, declares the Lord, and I will be the glory in her midst.’”
Obviously, the Zechariah passage is in reference to the Millennial Kingdom. And recall that Revelation 20 places the Gog Magog invasion at the end of the MK, which is supported by numerous statements in Ezekiel 38-39 as well as the book of Joel. And I am fully prepared to defend these assertions!