I think not only is the battle of Ezekiel 38 & 39 before the Great Tribulation (the last 3 1/2 years) but may very well be the kickoff to the whole seven-year enchilada so to speak. After studying Ezekiel 38 & 39 and Revelation, I believe that sometime around the time of this battle is when the rapture of the church takes place and the tribulation begins.
Ezekiel 39:9 indicates a seven-year period after the war and 39:22 says, So the house of Israel shall know that I am the Lord their God from that day and forward. This seems to map with Revelation Chapter Seven (part of the sixth seal) when 144,000 of Israel are "sealed" (saved) after the rapture of the church (Rev 4:1) and after "the fourth part of the earth" is killed (Rev 6:8). (I never thought of this until now, but maybe the battle of Ezekiel 38 & 39 is included in the fourth seal when 1/4 of the world is slaughtered - interesting thought.)
I believe that it is very possible that it will be the Ezekiel 38/39 war that causes the world to be in the right condition to go along with the seven-year "peace" covenant that ushers in the Antichrist. And, I also believe that the rebuilding of the Temple will be part of that "covenant with death", as God calls it, and that is what will cause Israel to agree to the treaty.
I've told this story before, but it's quite relevant to the ramifications of this covenant that will be orchestrated by the Antichrist.
A well-known pastor, who travels to Israel frequently, had gone there a little while ago and was talking to some of the military and he asked them how they would recognize their Messiah when he came. Their response was that he would help them rebuild their temple.
It all fits together perfectly, and everything is falling into place so fast it's impossible to keep up with it.