History of Scottish Gaelic
All surviving dialects are Highland and/or Hebridean dialects. Dialects of Lowland Gaelic have become defunct since the demise of Galwegian Gaelic, originally spoken in Galloway, which seems to have been the last Lowland dialect and which survived into the Modern Period. By the 18th century Lowland Gaelic had been largely replaced by Lowland Scots across much of Lowland Scotland. According to a reference in "The Carrick Covenanters " by James Crichton, the last place in the Lowlands where Scottish Gaelic was still spoken was the village of Barr in Carrick: only a few miles inland to the east of Girvan, but at one time very isolated. Crichton gives neither date nor details.
Goidelic languages
Its historical range was much larger. For example, it was the everyday language of most of the rest of the Scottish Highlands until little more than a century ago. Galloway was once also a Gaelic-speaking region, but the Galwegian dialect has been extinct there for approximately three centuries. It is believed to have been home to dialects that were transitional between Scottish Gaelic and the two other Goidelic languages. While Gaelic was spoken across the Scottish Borders and Lothian during the early High Middle Ages it does not seem to have been spoken by the majority and was likely the language of the ruling elite, land-owners and religious clerics. Some other parts of the Scottish Lowlands spoke Cumbric, and others Scots Inglis, the only exceptions being the Northern Isles of Orkney and Shetland where Norse was spoken.