Apparently from the same root as H1465 (in the sense of massing); a foreign nation ; hence a Gentile ; also (figuratively) a troop of animals, or a flight of locusts: - Gentile, heathen, nation, people.
561 occurrences in 511 verses in the Hebrew Old Testament.
So the LORD sold them into the hand of Jabin king of Canaan, who reigned in Hazor. The commander of his forces was Sisera, who lived in Harosheth-hagoyim.
Nevertheless, the people of each nation continued to make their own gods in the cities where they had settled, and they set them up in the shrines that the people of Samaria had made on the high places.
גּוֹיgō·wthe people of each nationN-mscH1471גּוֹיgō·w…N-msH1471גּוֹיgō·wthe peopleN-mscH1471גּוֹיgō·w–N-msH1471
Herds will lie down in her midst, creatures of every kind. Both the desert owl and screech owl will roost atop her pillars. Their calls will sound from the window, but desolation will lie on the threshold, for He will expose the beams of cedar.