Praise be to Allah.
Soorat al-Faatihah is one of the Makkan soorahs [i.e., revealed during the Makkan period, before the Hijrah], according to the majority of scholars. The scholars quoted several things as evidence for it being classified as Makkan, including the following:
1. There is a great deal of saheeh (sound) evidence to support this view, including the verse in which Allah, may He be exalted, says (interpretation of the meaning): “And We have certainly given you, [O Muhammad], seven of the often repeated [verses] and the great Qur’an” [al-Hijr 15:87].
This verse from Soorat al-Hijr is Makkan according to scholarly consensus. The Prophet (blessings and peace of Allah be upon him) explained the “seven often repeated [verses]” as referring to Soorat al-Faatihah, which implies that al-Faatihah was revealed during the Makkan period.
2. Prayer was enjoined in Makkah, and prayer is not valid without Soorat al-Faatihah.
In fact, some of the scholars were of the view that al-Faatihah was the first thing to be revealed, but this is a weak view.
Ibn Taymiyah said: The Opening of the Book [i.e., Soorat al-Faatihah] was undoubtedly revealed during the Makkan period.…
The view of those who say that al-Faatihah was not revealed until the Madinan period is undoubtedly wrong.
End quote from Majmoo‘ al-Fataawa (17/190-191).
A number of well-versed scholars – such as Ibn Taymiyah, Ibn Katheer, Ibn Hajar, al-Baydaawi, al-Kawaashi, and others – preferred the view that Soorat al-Faatihah was revealed during the Makkan period.
See: al-Makki wa’l-Madani by ‘Abd ar-Razzaaq Husayn (1/446-468).
Al-Qurtubi said in al-Jaami‘ li Ahkaam al-Qur’aan (1/115): There is no difference of opinion concerning the fact that prayer was enjoined in Makkah, and there is no report to suggest that there was a time when Muslims offered their prayers without “al-hamdu Lillahi Rabbi l-‘aalameen”. This is indicated by the fact that the Prophet (blessings and peace of Allah be upon him) said, “There is no prayer except with the Opening of the Book.” This is speaking about the ruling, not when it began. And Allah knows best. End quote.
And Allah knows best.