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.
Galwegian Gaelic
It is thought that Galwegian Gaelic probably had more in common with the Manx and Ulster Irish than with Scottish Gaelic as spoken in the Highlands. This idea has in the past been used to disassociate Galwegian Gaelic from other Scottish dialects, for political purposes in fact. However, the idea is very misleading. Medieval Goidelic was a single language with a universal educated standard and regional dialects, which seem to have been mutually comprehensible. Perhaps the Gaelic dialect of the Isle of Arran parallels the Galwegian language most, but this is purely speculative.