In biology, species which once had a wide range but have survived only in a small area are known as relict species. A famous example is the Snowdon lily, Gagea serotina. Although the species is found in other areas of the world, it disappeared from most of Great Britain at the end of the last ice age. However, it survives to this day on some of the higher mountains in Snowdonia, where the climate is still cold enough to support it. In many ways, varieties of human languages can be compared to varieties of organisms; and so there are some languages which can be regarded as relict languages. That is, although they are now spoken in a small area, maybe a couple of villages, they were once spoken in a wider range, perhaps as the main language of some state, long since collapsed. Here are some examples of such languages.
First: you might have heard of the Scythians, a nomadic people known to the ancient Greeks and Romans whose territory once ranged over a vast area of the Eurasian steppe stretching from the Carpathian Mountains in the west to the Altai Mountains in the east. Something you might not have heard is that the Scythians have survived, in a certain sense, to the present day. Little is known about the language spoken by the Scythians, but it’s generally agreed that it was part of the Iranian group, and hence related to Persian, and, more distantly, to English. After the 3rd century BC the region became dominated by the Scythians’ eastern neighbours, the Sarmatians, although the Sarmatians were closely related and so the region remained Iranian-speaking. This linguistic continuity was only broken after the 3rd century AD, when first the Germanic-speaking Ostrogoths, then the Huns (whose linguistic affiliations are unknown) established themselves as the dominant power on the Pontic steppe. Some of the Sarmatians, who were by this time known as Alans (this was originally been a name of one of their subdivisions), migrated to the west in response; some of them even got as far as North Africa, where they accompanied the Germanic-speaking Vandals. But their linguistic presence in the west was ephemeral. Others, however, managed to stay on the Pontic steppe and keep speaking their language, albeit in a smaller, more southerly area than before, with its southern border marked by the Caucasus mountains. This region, known as Alania, preserved a distinctive identity throughout the early medieval period, and its population became Christian due to the influence of the nearby Byzantine Empire. But after the Mongol invasions of the 1230s, the Alans were driven out of most of Alania. Once again, some of them went to the west, and these Alans came to settle in Hungary, where they quickly lost their language, but have retained a separate ethnic identity as the Jász people to the present day. The others were forced to retreat even further south into the Caucasus mountains themselves. But these high mountains are not particularly attractive territory for conquerors. And so these Caucasian Alans have survived to the modern day, although they are now known by yet another name: that of the Ossetes. Today the Ossetes live in North Ossetia-Alania, an autonomous Republic within the Russian Federation, and in South Ossetia, a de facto independent state, backed by Russian support, in territory regarded by most countries as part of Georgia. The Ossetian language, a direct descendant of Scythian or a close relative of it, has about half a million speakers and is in no danger of disappearing any time soon.
There is another relict Iranian language called Yaghnobi. The language has only about 12,500 speakers today, much less than Ossetian, and it is in some danger of extinction. Today, it is spoken mostly in the town of Zafarabod in northwestern Tajikistan. The name of the Yaghnobi reflects the fact that these people originally lived in the remote Yaghnob valley, situated to the south of this town, before they were forcibly deported in their entirety by the Soviet government to provide labour for cotton plantations near Zafarabod. Since Tajikistan became independent, the Yaghnobi people have been able to return to their homeland, but only a few hundred have taken up the option as the economic infrastructure needed to make the area habitable is no longer present. Most of the Yaghnobi people now speak Tajiki Persian as well as Yaghnobi; although the language is still relatively healthy, it does seem like it may gradually die out in favour of Tajiki, especially if the Yaghnob valley remains unsettled in any significant number. Some online resources on Yaghnobi can be found here; more information on the Yaghnobi resettlement can be found here.
So, where does Yaghnobi come from? Although it’s an Iranian language like Tajiki, it is quite distinct; it’s part of the Eastern subgroup, along with Ossetian, while Persian and its varieties are part of the Western subgroup. Yaghnobi is in fact the last surviving descendant of the Sogdian language. Unlike Scythian, Sarmatian and Alanian, which are very sparsely attested, there is a large literary corpus in Sogdian so we can be quite sure about this. Sogdia is a historical region in Central Asia centred around the city of Samarkand, which is near the eastern border of modern Uzbekistan (so it is right next to western Tajikistan, which is where Yaghnobi is spoken). It was part of Cyrus the Great’s Persian empire in the mid-1st millennium BC, and like the Persians, the Sogdians practised the Zoroastrian religion. However, it has been independent from Persia for most of its history. During the 1st millennium AD, the Sogdians became prominent as mediators of the trade along the Silk Road; the Chinese thought of them as a nation of merchants. The Sogdian language was the lingua franca along the Silk Road’s Central Asian stretch. The Muslim conquests re-integrated Sogdia as part of the Persian sphere, and over the course of the next few centuries, Sogdian was gradually replaced by Persian over most of its range… except, of course, in the Yaghnob Valley. There is some evidence that other Sogdian dialects survived in other remote valleys for extended periods, but Yaghnobi is the only one which survives today.
Moving outside of the Iranian languages, there’s the example of Udi, one of the Northeast Caucasian languages. It is the main language of just one village, called Nij, in northern Azerbaijan, although it is also spoken widely in the city of Oğuz (which was known as Vartashen before 1991). The Udis and the Bats of Georgia are the only Northeast Caucasian-speaking people who are Christian rather than Muslim. According to them, they were once part of a separate Albanian Orthodox Church before this church was abolished by the Tsarist authorities in 1836 (the church has, as of 2003, been re-established). Albania was the name of a state in the eastern Caucasus region in classical times (it has no relation to the modern state which is also called Albania, and is sometimes referred to as Caucasian Albania, to avoid confusion). It was probably a multi-ethnic state, but the Latin name Udini is recorded for the population of one of its provinces, which suggests that it was home to the ancestors of the Udis. Also, Udi has a number of Armenian loanwords, indicating the heavy Armenian influence on this kingdom. Moreover, there are also a few surviving inscriptions from Caucasian Albania. These inscriptions have not been easy to decipher, but from what we can make out, it is apparently fairly clear that they are written in an older form of Udi, which indicates that Udi might have been the main language, or one of the main languages of Caucasian Albania. For more on the history of Udi, see here.
Another, slightly different example of a relict language is Tsakonian. Tsakonian is often regarded as a dialect of Greek, and this is accurate, in a sense. However, it is not mutually intelligible with standard Greek. Moreover, all of the other modern dialects of Greek are descendants of Koine Greek, the lingua franca of Greece and the wider Hellenistic world that evolved after the conquests of Alexander the Great. Before then, the Greek language was divided into several quite distinct dialects, with no single one being more prominent than the other. The Koine Greek dialect evolved as a mixture of the main dialects, although Attic (the dialect of Athens) was the dominant element in this mixture. Another one of these ancient Greek dialects, Doric, was spoken in the southern and western parts of the Pelopponese; it was the language of the city of Sparta, among others. Unlike the other modern Greek dialects, which are clearly descendants of Koine Greek, albeit sometimes with influence from the ancient dialects, Tsakonian is a descendant of Doric. It has been influenced by Koine Greek, but it cannot be considered a descendant of it. In the present day Tsakonian is spoken in a rather small, mountainous area of the southeastern Pelopponese, known as Cynuria. Presumably it is descended from the variety of Doric that was spoken here in ancient times; it is therefore not quite a descendant of the language spoken by the Spartans, but it is the closest thing we have to that. But it’s likely to disappear soon: only a couple of hundred speakers remain, who have varying levels of fluency, and are mostly elderly.
Another interesting case is that of Western Yugur. Western Yugur is the modern descendant of the Old Uyghur language, which was the language of Uyghur Khaganate. The Uyghur Khaganate was a confederation which extended across a wide area of the eastern Eurasian steppe, north of China. It had the territory of modern Mongolia within its borders. Like many of these steppe empires it was short-lived; it was established around 750 BC and collapsed around 850 BC. These Uyghurs should not be confused with the modern people called the Uyghurs, who live in Xinjiang Province in northwestern China. Until the early 20th century, these people were not even known as Uyghurs; the name of the medieval Khaganate was chosen for them at a 1921 conference in Tashkent. Before then, they had little sense of identity as distinct from other Turkic groups such as the Kazakh and Kyrgyz. While Old Uyghur and its descendant, Western Yugur, are part of the Northeastern Turkic group along with Yakut, Tuvan and Altay, the modern Uyghur language is part of the Southeastern Turkic group along with Uzbek and the extinct Chagatay language. The Khaganate collapsed after the invasion of a people known as the Kyrgyz, who were, again not the (linguistic) ancestors of the modern people known as the Kyrgyz (this is kind of a theme with Turkic ethnic designations)—they lived in the upper Yenisei River valley in Siberia, north of the Uyghur Khaganate and are the ancestors of the modern Khakas Turks. But some of its former inhabitants migrated to the southeast into the modern Gansu Province of China, where they have remained to this day as the Western Yugur. By now, you might be wondering: what about the Eastern Yugur? Well, the Yugur actually speak two different languages, with completely different origins (OK, they are related if you accept the Altaic language family, which not all linguists do). Eastern Yugur is Mongolic, rather than Turkic; it’s a descendant of the old variety of Mongolian spoken by Genghis Khan. Presumably, it was introduced to the Yugurs after the rise of the Mongols.
Speaking of the Mongols…most of the Mongolic languages spoken in Mongolia or in nearby regions of China or Russia, but there are two exceptions: the Kalmyk language, spoken in Russia (this is also an interesting case and I encourage you to look up the history of the Kalmyks), and the Mogholi language, spoken in the western, mainly Persian-speaking Herat Province, Afghanistan. Like all the other Mongolic languages, Mogholi is a direct descendant of the Mongolian language as spoken by Genghis Khan; it was presumably brought to Afghanistan in the 13th century AD by Mongol soldiers who were stationed there. I suppose it doesn’t exactly count as a relic language, because, although the political dominance of the Mongols did extend over a wide area of Eurasia including Afghanistan, the Mongolian language probably didn’t become established in most of this range. But it’s still a remarkable example, in my opinion. When Michael Weiers did fieldwork on the language in the 1970s, it was only spoken in two villages, Kundur and Karez-i-Mulla, and its speakers were mostly elderly. It has not been studied since (the political situation in Afghanistan since the end of 1970s has probably not helped, although apparently Herat is under fairly secure government control at the moment), and it is quite likely that it has become extinct since then. Fortunately, it looks like a fair amount of information has been gathered about the language.
There are more examples could be listed. For example, Aramaic, the lingua franca of the pre-Islamic Middle East, has survived among many scattered communities; each of the modern Aramaic varieties has its own interesting history. And there may be more that have not been identified, because their histories are unknown or unknowable; for example, we don’t know anything about the linguistic affiliations of the Indus Valley Civilization, or of the Olmecs.