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
Classical Gaelic, otherwise known as Early Modern Irish, covers the period from the 13th to the 18th century, during which time it was used as a literary language in Ireland and Scotland. This is often called Classical Irish, while "Ethnologue" gives the name "Hiberno-Scottish Gaelic" to this standardised written language. As long as this written language was the norm, Ireland was considered the Gaelic homeland to the Scottish literati.