Many consider the Sasanian Empire to be the last Persian empire, while others regard it as the last pre-Islamic Persian empire. These are vastly different conclusions. Yes, Islam eventually became the predominant religion after the conquest, but this can be a bit confusing considering that Arabs currently make up just 2% of the Iranian population. If the distinction is of religion rather than race, was there a time in which historians began to consider Islam as part of the Persian zeitgeist or is it still considered inextricably linked to Arab usurpation?
Zoroastrian statelets survived in the north for nearly two centuries after the conquests, and were an important source of support in the Abbasid rebellion, so one can hardly call them the end.
But I think the more important points to make here are two: One, just how rapidly converted Persian/Persianate dynasties rebounded and established themselves as great powers in the east after the death of Harun al-Rashid. The two centuries or so after that are often known as the "Iranian Intermezzo", featuring fairly short-lived but potent kingdoms such as the Saffarids and Samanids, which claimed the legacy of the Sasanians, used titles such as "Shahanshah", and so on. The Buyids even vassalized the Caliph himself.
Point two: The survival of the Caliphate was, as we see in the Abbasid revolution, basically contingent on adopting imperial customs of Persia. This includes for example adopting the priniciple of hupadkhwaday, or [morally] good governance, one of the prime duties of the Sasanian monarch, and the adoption of large swathes of Sasanian law.
[I'm going to skip over the Seljuks and their successors here - they are definitely very important, but I'm just not well-enough read up on them to give a good overview]
The revival of Iran as a continuously existing entity, though, as opposed to short-lived Persian or "Persianate dynasties", only comes after the fragmentation of the Mongol Empire. Ghazan Khan, in the late 13th century, decided to revive the Sasanian term for the state along with an Islamo-Mongolian version of its semi-divine kingship by declaring himself Padishah of Iran and Islam. Previously to that, Iran had only been used most sparingly as a geographical term, especially in political contexts (where I think there are only one or two references, to a Samanid or Saffarid shah as "the pride of Iran" or something along those lines) whereas in works like the Shahnameh it is more common and therefore had a strong cultural currency.
Following the fragmentation of the Ilkhanate, and the Persianized Turko-Mongol conqueror Timur's campaigns, Iran lives on through the Timurid renaissance, a high point of culture and scientific progress (starkly contrasted by the destructive warfare and strife which Timur is more famous for) that reached its height in the early-mid 15th century, under the reign of Timur's son Shah-Rukh (d. 1447) whose son Ulugh Beg was one of the greatest scientists and scientific sponsors of the day. As any player of Europa Universalis IV knows, after Shah-Rukh's death things were never quite the same.
The Timurid state collapsed, and over the following 50 years, Iran undergoes several occupation by the Turkic-Kurdish tribal confederacies known as the Aqqoyonlu and Qara Qoyonlu. These begin collapsing after the Aqqoyonlu are defeated by an alliance of religious zealots and Caucasian Christian states led by the Safavid order of Ardabil at the battle of Nakhchivan in Azerbaijan. This initiates the Safavid Conquests, where the young Shah Isma'il I lays the foundation for the institutions of powerful landowning Shi'a clergy that live on to this day; this is often considered the founding of the modern state of Iran (which it is known as continuously from this point, contrary to the popular perception that this was an invention of Reza Shah).
However, the state of Iran never quite reached the heights of its former glory; in spite of brief high points under Shah Abbas I around 1600, and the mind-bogglingly succesful campaigns of Nader Shah ("the Napoleon of Persia") in the mid-1700's, it was constantly subject to intertribal warfare and struggle, where various "tribes" such as the Qajars and Afsharids used as the semi-mercenary backbone of the military were a constant cause for instability. Nader Shah himself was an Afsharid; after his death, the Qajars would eventually seize power of the rather sad scraps that remained of that once-powerful state into the 20'th century.