“Starting sometime around the 5th century Gaelic language and culture spread from Ireland to the southwest coast of Scotland where it may have already existed since Roman times. Uncertainty over this comes as a result of the fact that there is disputed archaeological evidence to support the generally accepted tale of migration while there is some to suggest that there was none – the evidence also points to the population of the area (modern day Argyll) being constant during the time of the alleged Scottish invasion. This area was known as Dál Riata. The Gaels soon spread out to most of the rest of the country. Culturo-linguistic dominance in the area eventually led to the Latin name for Gaelic speaking peoples, “Scoti”, being applied to the state founded by the Gaels, Scotland (Alba in Gaelic). Since that time Gaelic language rose and, in the past three centuries, greatly diminished, in most of Ireland and Scotland. The most culturally and linguistically Gaelic regions are in the north west of Scotland, the west of Ireland and Cape Breton Island in Nova Scotia where the descendants of the Highland Clearances were transplanted.”
“The Gaels took over the kingdom of the Picts in the north east of Scotland and then the other kingdoms in southern Scotland, creating Scotland as a single kingdom within its present boundaries by 1013 AD. Scotland is therefore older than England, France, Spain, Germany, Italy, Belgium and other European countries.
By about the tenth century Gaelic was the official language of all of Scotland and Ireland
They are both “Gaelic” in that they are both descended from the language of the Gaels: a Celtic people who relocated from the European mainland to Ireland (and later to Scotland and the Isle of Man).
But just as Latin eventually splintered into different languages after the fall of Rome, as Gaels from Ireland began to spread out into other areas in the 6th and 7th centuries, their languages began to diverge as well. (to learn more about one such group, the Dál Riata, check out this article at Wikipedia).