In a Nutshell: Introduction
Traditionally, it has been said that there are three stages for prohibiting khamr based on four verses: khamr is a lawful drink, abandon it before prayer and the final stage was the total prohibition in the third year of Hijrah.
This notion is not 100% accurate because there no verse allows the khamr, rather all the verses condemn it and the later one prohibited it.
This question is important as it is claimed the Islamic rules prohibiting alcohol were revealed gradually over a period of time to make the process of social change easier. This notion of gradualism of Islamic legislation was adopted by many classical and modern scholars. Based on the gradual development of the prohibition of khamr, they argued that the nature of the Shari'ah is evidently to make things easy so that Muslims can readily receive its rules and practice them. It is further argued by some modern scholars such as Yusuf al-Qaradawi that the societies not subjected by the rules of Islamic Shari'ah can be changed in a similar manner by gradually applying the rules of Islamic Shari'ah rather than instantaneousness. This notion of gradualism in applying Shariah is in conformity with the objectives of Ikhwan Muslimoon (Muslim Brotherhood), an international Sunni Islamist movement that aims at establishing of a worldwide Caliphate or universal Islamic state through gradual and peaceful means.
This issue whilst discussed historically by the Muslim jurists remains controversial. This answer will consider these discussions and the evidences relied upon and it seeks to provide a more deeply considered response. Evidences
1. وَمِن ثَمَرَاتِ النَّخِيلِ وَالْأَعْنَابِ تَتَّخِذُونَ مِنْهُ سَكَرًا وَرِزْقًا حَسَنًا (النحل 67)
And (We grant you nourishment) from the fruit of date-palms and vines: from it you derive intoxicants as well as goodful rizq (substance). (al-Naḥl:67)
2. يَسْأَلُونَكَ عَنِ الْخَمْرِ وَالْمَيْسِرِ قلْ فِيهِمَا إِثْمٌ كَبِيرٌ وَمَنَافِعُ لِلنَّاسِ
"They ask you about wine and gambling. Say, "In them is a great filth and (yet, some) benefit for people. But their filth is greater than their benefit." (Qur'an 2:219)
3. يَا أَيُّهَا الَّذِينَ آمَنُوا لَا تَقْرَبُوا الصَّلَاةَ وَأَنتُمْ سُكَارَىٰ - النساء 43
O you who have believed, do not approach prayer while you are intoxicated. (Nisa':43)
4. يَـأَيُّهَا الَّذِينَ آمَنُواْ إِنَّمَا الْخَمْرُ وَالْمَيْسِرُ وَالاٌّنصَابُ وَالاٌّزْلاَمُ رِجْسٌ مِّنْ عَمَلِ الشَّيْطَـنِ فَاجْتَنِبُوهُ لَعَلَّكُمْ تُفْلِحُونَ - إِنَّمَا يُرِيدُ الشَّيْطَـنُ أَن يُوقِعَ بَيْنَكُمُ الْعَدَاوَةَ وَالْبَغْضَآءَ فِى الْخَمْرِ وَالْمَيْسِرِ وَيَصُدَّكُمْ عَن ذِكْرِ اللَّهِ وَعَنِ الصَّلَوةِ فَهَلْ أَنْتُمْ مُّنتَهُونَ (المائدة 90-91)
O you who have believed, indeed, intoxicants, gambling, (sacrificing on) stone alters (to other than Allah), and divining arrows are but defilement from the work of Satan, so avoid it that you may be successful. (Qur'an 5:90)
5. A'ishah (ra) said: Juristic Views
عن عَائِشَةَ أُمِّ الْمُؤْمِنِينَ ـ رضى الله عنها: إِنَّمَا نَزَلَ أَوَّلَ مَا نَزَلَ مِنْهُ سُورَةٌ مِنَ الْمُفَصَّلِ فِيهَا ذِكْرُ الْجَنَّةِ وَالنَّارِ حَتَّى إِذَا ثَابَ النَّاسُ إِلَى الإِسْلاَمِ نَزَلَ الْحَلاَلُ وَالْحَرَامُ، وَلَوْ نَزَلَ أَوَّلَ شَىْءٍ لاَ تَشْرَبُوا الْخَمْرَ. لَقَالُوا لاَ نَدَعُ الْخَمْرَ أَبَدًا. وَلَوْ نَزَلَ. لاَ تَزْنُوا. لَقَالُوا لاَ نَدَعُ الزِّنَا أَبَدًا. - البخاري 66/15
(Be informed) that the first thing that was revealed thereof was a Sura from Al-Mufassal, and in it was mentioned Paradise and the Fire. When the people embraced Islam, the Verses regarding legal and illegal things were revealed. If the first thing to be revealed was: "Do not drink alcoholic drinks." people would have said, "We will never leave alcoholic drinks,' and if there had been revealed, "Do not commit illegal sexual intercourse, "They would have said, "We will never give up illegal sexual intercourse." (Bukahri 66:15)
Khamr was prohibited after the battle of Uḥud according to the historians. (Ibn Hishām, al-Sīra al-Nabawīya 2:190–191; Ibn Kathīr, al-Bidāya wa-al-Nihāya, 3:127–128) However, the scholars differed about the exact time of the battle, and most of them said it was in the third year after the Hijra. Ibn Taymiyah reported the agreement on this issue:
فَإِنَّ الْخَمْرَ حُرِّمْتْ سَنَةَ ثَلاثِ بَعْدَ أُحُدٍ، بِاِتِّفَاقِ النَّاسِ
"Khamr was prohibited in the third year after Uhud by the agreement of people (scholars)." (Ibn Taymiyah, Majmu al-Fatawa, Vol. 8, p. 55)
However, some scholars such as Qurtubi claim khamr was prohibited through gradual rulings starts with permissibility and ends with the prohibition. They base their arguments on the four verses in the evidences section. (Qurtubi, Al-Jam li Ahkam al-Qur'an, Vol. 4, p.2283)
The first stage started with the first two verses revealed closely together in Mecca. During this stage, it is said people used to drink khamr and it was lawful according to the Qur'an.
The second stage allegedly began when Abd al-Rahman ibn Awf (ra) made food and invited some of the companions including Ali (ra). He served wine whereby they became intoxicated, and when praying the Maghrib (sunset) prayer, the imam misread Qur'anic verses, instead of reciting, "We (Muslims) don't worship what you worship (the idols)" (Al-Kafrun:2) he recited, "We worship what you worship" thus leading to the revelation of, "O you who have believed, do not approach prayer while you are intoxicated" (Nisa':43) prohibiting khamr before prayers.
The final stage of prohibition came later when Uthman ibn Affan invited a group of al-Ansar, and after drinking, they had an argument leading to a altercation. Umar said, "O Allah! Give us a clear ruling regarding khamr.'' Soon after, Allah sent the verse "O you who believe, indeed, intoxicants, gambling, (sacrificing on) stone alters (to other than Allah), and divining arrows are but defilement from the work of Satan, so avoid it that you may be successful. (Qur'an 5:90) and "Satan only wants to cause between you animosity and hatred through intoxicants and gambling and to avert you from the remembrance of Allah and from prayer. So will you not desist? (Ma'idah: 90-91) (Razi, al-Tafsir al-Kabir, vol. 6, p. 43)
In this regard, there was a famous dispute which involved scholars of Usul al-Fiqh (Principles of Islamic Jurisprudence) and Ilm al-Kalam (Islamic Theology) about the original state of things like khamr before it was sanctioned by a Qur'anic verse:
The first opinion says that the original state of things is taḥrīm (being forbidden) until the Qur'an sanctions otherwise. To this position belong some of the Ḥanafī and Ḥanbalī jurists, some of the Muʻtazilī theologians, and the literalists among the Mālikī jurists.
The second opinion says tawaqquf, that is, temporary cessation or suspension until a clear sanction is given. To this position belong most of the Shāfiʻī jurists, including the famous theologian Abū al-Ḥasan al-Ashʻarī, some of the Ḥanafī jurists, including another famous theologian Abū Manṣūr al-Māturīdī, and Ibn al-Ḥājib from the Mālikī school of law. In this venue, the modern usuli scholar Muhammad Abu Zahrah noted that the scholars of usul argue it was 'matrook - left with no exact ruling,' or 'ma'fu anhu - exempted by the legislator to be prohibited later' as no verse prohibits nor allows it. (Abu Zahrah, Zahrat al-Tafaseer, Vol. 2, p. 299)
The third opinion assigns ibāḥa (neutrality) as the normal state of things unless taklīf, or assignment of responsibility to do it as a duty or to avoid it as forbidden exists. Therefore, all things are mubāḥ (permitted) until the Qur'an gives a sanction to change this state. To this position belong most of the Ḥanafī jurists, some of the Mālikī jurists, some of the Shāfiʻī jurists, and some of the Muʻtazilī theologians.
Finally, the third opinion became predominant. (Khashan Ammar, The Quran's Prohibition of Khamr (Intoxicants): A Historical and Legal Analysis for the Sake of Contemporary Islamic Economics, pp. 98-99) My Analysis
By examining these four Qur'anic verses, it seems that none of these verses makes khamr lawful or do they refer to gradual prohibition.
In the first verse mentioned in evidences section, it does not say khamr is good or allowed, rather people use it in two different things: good and the other unlabeled: "From the fruit of date-palms and vines: from it you derive intoxicants as well as goodful rizq (substance)." So, what is named to be good was the non-intoxicated extraction, so the other unlabeled usage has to be the counter of this meaning (or rather they would have been joined together in the sentence). This, therefore, refers to the disliked way practised.
The second verse addressed questions on khamr and gambling, and answered them directly. Therefore, some of the Companions left the habits of drinking and gambling at the point when the following Qur'anic message clearly stated the great sins in them. (Thaʻlabī, Al-Kashf wa-al-Bayān, Vol. 2, pp. 141–142; Baghawī, Ma'alim al-Tanzil, Vol. 1, p. 276)
The third verse gives a conditional prohibition in a clear manner, not as indirect as the case of the second verse. According to this verse, they had to abstain from drinking khamr during the prayer times. Because the prayer times occupy most of daytime, except the morning after the sunrise, and earlier parts of night after the sunset, they were left with chances to drink only after the night prayer, but not close to the dawn prayer, or after dawn prayer in the morning before starting work.
The fourth and last verse gives an unconditional prohibition, linking it with Satan.
These verses, therefore, do not signify a gradual prohibition. In fact, the Qur'an was revealed in a community where khamr is too rooted, like the water in our Muslim communities now. Allah sent two verses demonstrating the filth in the society and directing them to the alternative 'goodful rizq (substance) and benefit' whom they can replace with the filth exists in their way of life.
Some of them (such as Umar and others) learned the lesson and wanted to abandon khamr, but other still drink it for the goodness stated in it and claimed to leave the worse. (Baghawi, Ma'alim al-Tanzeel, Vol. 1, p. 276)
Later, they were asked not to pray while been intoxicated. So, a greater number of them abandoned it to stay in a spiritual state all the time, and not to fall in the sin of leaving the prayer. (Ibid)
It was narrated some Muslims said:
لَا خَيْرَ فِي شَيْءٍ يَحُولُ بَيْنَنَا وَبَيْنَ الصَّلَاةِ
"There is no goodness in something hinders us from prayer." (Ibid)
Thus, the society now is ready to accept the ruling very easily, especially after they suffered from a number of incidents happened (such as bloody fighting by drunk Muslims) before the revelation of the fourth verse. (Baghawi, Vol. 1, p. 277)
So, the verses have nothing to do with gradual legislation, rather gradual preparation of the society.
Similar notion was adopted by imam Abu Zahrah above and the contemporary mufasir ibn Ashur who said:
وَتِلْكَ الْآيَةُ كَانَتْ إِيذَانًا لَهُمْ بِأَنَّ الْخَمْرَ يُوشِكُ أَنْ تَكُونَ حَرَامًا لِأَنَّ مَا يَشْتَمِلُ عَلَى الْإِثْمِ مُتَّصِفٌ بِوَصْفٍ مُنَاسِبٍ لِلتَّحْرِيمِ، وَلَكِنَّ اللَّهَ أَبْقَى إِبَاحَتَهَا رَحْمَةً لَهُمْ فِي مُعْتَادِهِمْ، مَعَ تَهْيِئَةِ النُّفُوسِ إِلَى قَبُولِ تَحْرِيمِهَا، فَحَدَثَ بَعْدَ ثَلَاثِ سِنِينَ
"This verse (the second) was a note telling them khamr is about to be prohibited, because what contains filth is suitably equal to prohibition. But Allah mercifully left its allowance (ibahah) because of their habitual usage, but with preparing the souls to accept its prohibition that happened after three years." (Ibn Ashur, al-Tahreer wa al-Tanweer, Vol. 5, p. 60)
Similarly, the above-mentioned hadith reported to be argued by Aisha (ra). Conclusion
There was a gradual preparation of the people to accept the prohibition, not a gradual prohibition as there is no verse permits drinking khamr but it rather condemns it. References
Abu Zahrah, Zahrat al-TafaseerBaghawi, Ma'alim al-Tanzeel
Ibn Hishām, al-Sīra al-Nabawīya
Ibn Kathīr, al-Bidāya wa-al-Nihāya
Ibn Taymiyah, Majmu al-Fatawa
Ibn Ashur, al-Tahreer wa al-Tanweer
Khashan Ammar, The Quran's Prohibition of Khamr (Intoxicants): A Historical and Legal Analysis for the Sake of Contemporary Islamic Economics
Razi, al-Tafsir al-Kabir