All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad, sallallaahu 'alayhi wa sallam, is His slave and Messenger.
It is inconceivable that someone who is affiliated with religious knowledge should deny the existence of Gog and Magog and that they were behind the barrier built by Thul-Qarnayn in order to confine them, because their story is explicitly related in the Quran. However, the mistake that some affiliates to religious knowledge may make is that they figuratively interpret the texts about them. Some claimed that Gog and Magog are only a reference to some present-day populations of disbelievers, including the Russians, the Chinese, the Japanese, as well as others. However, this is an eccentric opinion that leads to denying the explicit texts of the Quran and Sunnah about Gog and Magog and their emergence at the end of time. Actually, these peoples truly have existed since ancient times and were not previously behind some barrier from which they subsequently emerged. Nevertheless, the one who holds such a claim (that is based on the figurative interpretation of the relevant texts) is not judged to be a disbeliever.
As for denying their existence in the first place, this constitutes disbelief because it involves plain disbelief in what Allah, The Exalted, explicitly Stated about them in the Quran. He Says (what means): {And none reject Our verses except the disbelievers.} [Quran 29: 47] It is inconceivable that such denial should be on part of someone affiliated with religious knowledge.
Muslim scholars stated that denying the existence of Gog and Magog constitutes disbelief, may Allah safeguard us. Shaykh Ibn Baaz, may Allah have mercy on him, said:
“There are authentic and Mutawaatir (collectively contiguous) Ahaadeeth reported on the authority of the Messenger of Allah, sallallaahu ‘alayhi wa sallam, about the descent of Prophet ‘Eesa (Jesus), son of Mary from the heaven at the end of time, and about the emergence of Gog and Magog ... all these veracities have been confirmed with authentic and Mutawaatir) Ahaadeeth attributed to the Prophet and denying them constitutes disbelief and misguidance. We ask Allah, The Exalted, to bless us with safety and well-being. There is no doubt about the veracity of Ad-Dajjaal (The Antichrist), the Christ (‘Eesa ibn Maryam), and Gog and Magog, and there are authentic) Ahaadeeth reported with Tawaatur (collectively contiguous narrations) about them from the Prophet .
As for Al-Mahdi, there are Mutawaatir reports about him as well, and a number of scholars transmitted that the reports on his emergence are authentically narrated on the authority of the Prophet and established by Tawaatur as well. However, some people find some problematic aspects in these narrations that urged them to refrain from judging those who only deny the coming of Al-Mahdi to be disbelievers.” [End of Quote]
For more benefit on Gog and Magog, please refer to Fataawa 361294, 280567, 81773, 350389, 91399, 806, and 12031.
Allah knows best.