In real history, the Alchon Hunas (not to be confused with their possible relatives who invaded the Roman Empire c. 440) were a Central Asian tribe who invaded India between around 480 (after a previous Huna incursion had been defeated c. 460 by Skandagupta, the last important ruler of the Gupta empire) and 528 (when a coalition of Indian kings led by Yashodharman of the Aulikara dynasty of Malwa defeated the last Huna king, Mihirakula). Their advent swept away the last Kushan successor states in northwest India and pushed the Gupta empire, which had been ascendant for a century (c. 350-450 CE) into terminal decline alongside Gupta feudatories breaking away from imperial authority.
All this occurred after the Kidarites, a previous Huna tribe who had conquered Bactria and Gandhara, were conquered by the Alchons with help from the Sasanian emperor Peroz I c. 466.

My question, therefore, is this: What if the Hunas went for Iran instead of India?

The initial PoDs would probably be something causing the Kidarites not to invade Punjab in the 460s, followed by the Alchons deciding to betray the Sasanians after seizing control of Bactria and Gandhara. However the timeline evolves, the Gupta empire should not collapse due to nomad invasions from the northwest (though internal collapse is fair game), while the Sasanian empire may either collapse entirely or survive.

Is there a realistic sequence of events to achieve this scenario? (I'm not well-versed in either Iranian, Indian or Central Asian history of this era, so I invite informed comments about the general context of the times.)

Assuming it is realistic, how would events play out subsequently? IRL the Hepthalites would be on the horizon for the Sasanids and the Hunas, while in the west the Roman empire, ruled by Zeno till 491 and then Anastasius Dicorus till 518, was struggling with other wars and revolts. A Gupta state not exhausted by conflict with the Hunas might have the resources to deal with insurgent feudatories instead, thus surviving for longer. What are the political impacts until around 1000, assuming that Muhammad establishes Islam and gains control of Arabia as IRL?

Culturally speaking, the Huna invasions and Gupta collapse ended the Golden Age of classical India, a time when mathematics, astronomy, medicine, art, literature and architecture flowered in India. How differently would culture and technology have evolved had it not been cut short? What result would Huna invasions (and possibly subjugation) have on Iran?

I haven't considered details yet, but politically speaking, I think the Gupta empire might continue ruling north India until ~550 before being torn apart by its feudatories, a century later than IRL.

The Sasanian empire barely holds itself together in the face of the Huna invasions and (maybe with Gupta help?) confines the advance of the Hepthalites, who subdue the Alchons, to Bactria, before destroying them by an alliance with the Turkic khaganate in the 560s. The Sasanids continue to hold western Afghanistan, but have little influence east of Gandhara.

Because of all the stuff going on in the east, the Iberian war might either not come to pass or go worse for the Iranians, which might give Justinian a freer hand in his reconquest of the west, though I'm not familiar at all with Europe in 500 CE.

In the longer term, a sustained peace in the sixth century between the Roman and Sasanian empires, both of whom are exhausted by conflicts in other parts of their empires, might place both in a better position to resist the advance of the Caliphate in the seventh century. Perhaps butterflies knock Mesopitamia and ever-rebellious Egypt into the Arab fold anyway, but the Romans could retain northern Syria and Carthage while the Iranians, either under the Sasanids or a new dynasty, maintain control beyond the Zagros mountains.

India post-Guptas becomes... the same hot mess it always was. Either new dynastic empires based in the Gangetic plain and the northern Deccan rise, conquer everything else and be in a cold-hot war situation with each other, or something similar to the Tripartite Struggle occurs, with three dynasties centred in Bengal-Bihar, the northern Deccan and the Indus valley contesting control over the middle.
(Both of these scenarios came to pass IRL after the fall of the Guptas.) The survival of the Iranian empire means the Caliphate will not be able to conquer Sindh, though maybe the Iranians themselves take over the Indus valley c. 600-650 instead.

Culturally, Zoroastrianism probably remains the major faith in Iran while Spain and North Africa beyond Egypt remain Christian due to the Caliphate's lesser extent. Buddhism or some Hindu sect remains predominant in Afghanistan and the Indus, with Islam spreading mainly among merchant communities along the western Indian coastline. Notably, the Zoroastrian exodus to India never occurs. I am given to understand that Central Asia had many diverse religious communities including Buddhists, Christians (particularly Nestorians), Manichaeism and various local/tribal faiths, so uh idk pls halp.

The Indian Golden Age lasting longer due to peace and stability in the Gupta empire might result in some of the advances made in the Islamic Golden Age, especially in mathematics, being made earlier instead, though I don't know enough to speculate on further technological effects.

The questions of happens when Turkic peoples migrate into Iran and India in the 10th-12th centuries is a very interesting one that I have no answer to at this moment, though I would like your opinions.