Gog is recorded ten times in the Old Testament, only one of which, 1Chronicles 5:4, is not related to prophecy. This English name is translated from the Hebrew word that means "mountain" (Strong's Concordance #H1463). In its only New Testament occurrence, in Revelation 20:8, Gog is derived from a Greek word which means the same as its Hebrew counterpart (Strong's #G1136).
The prophet Ezekiel, taken captive by Babylon in 597 B.C., lived near the river Chebar (Ezekiel 1:1, 3:15). His captivity began more than 120 years after the Kingdom of Israel (the northern ten tribes) were conquered by the Assyrians and taken out of the land (2Kings 17). As such, his prophecies concerning Israel, especially in relation to Gog (Ezekiel 38 - 39), are referencing their end time descendants populating such countries such as America, the United Kingdom, Israel and others.
The Bible labels Gog, who dwells in the land of Magog, as a chief prince of Meshech and Tubal (Ezekiel 38:2). Meshech, Tubal and Magog were all sons of Japheth, one of Noah's three sons who survived the great flood (see Genesis 10). Magog's land is located in "the uttermost parts of the north" (Ezekiel 38:15, 39:2, HBFV throughout) or far north of where Ezekiel was located.
Verse 16 of Ezekiel 38 is packing with detailed information regarding prophecies that will soon come to pass.
And you shall come up on My people Israel like a cloud, to cover the land. It shall be in the latter days, and I will bring you against My land, so that the nations (Gentile, non-Israelite nations like you) may know Me when I shall be sanctified in you, O Gog, before their eyes (Ezekiel 38:16).
The above verse reveals, in the latter days (the end time), that Gog (Russia) will lead a massive army against the descendants of Israel. God, however, will be against their desire to conquer his people (see also Ezekiel 39:1) and will fight against them to bring glory to His name.
Those that are allied with Russia against God's people will be Gomer and all his bands (China, Ezekiel 38:6), Persia (Iran), Libya (verse 5) and several others. The Lord will chide this evil coalition for planning to attack his people who are blessed (Ezekiel 38:11 - 14). Their launching of a sneak attack will cause God's "hot anger" to be kindled against them (verse 18)!
God himself will then declare war on Gog and his allies (Ezekiel 39:1). They will be so utterly decimated that there dead bodies will provide food for birds and other animals (verses 3 to 5). The number of corpses will be so incredibly high that it will take seven months to bury them all (verses 11 to 12).
After the Millennium
Satan the devil, upon Jesus' return to earth, will be put in a spiritual prison unable to deceive anyone for 1,000 years (Revelation 20:1 - 3). When he is ultimately released, he will (yet again) deceive humanity about God. He will successfully raise an immense army called Gog and Magog, taken from around the globe, to wage war one last time against his sworn enemy.
And he shall go out to deceive the nations that are in the four corners of the earth, Gog and Magog, of whom the number is as the sand of the sea, to gather them together for war (Revelation 20:8).
The devil will lead his human army against God's kingdom headquartered in Jerusalem. He will maintain his perfect record of defeat, however, when Gog and Magog are soundly defeated as they camp around the holy city (Revelation 20:9). The great adversary will then receive his just reward for his innumerable sins by being put out of existence in the lake of fire (verse 10)!