Allan Ramsay was born at Leadhills, Lanarkshire to John Ramsay, superintendent of Lord Hopetoun's lead-mines and his wife, Alice Bower, a native of Derbyshire. John Ramsay was descended from lowland Clan Ramsay.
Allan Ramsay was educated at the parish school of Crawford, and in 1701 was apprenticed to a wig-maker in Edinburgh. He married Christian Ross in 1712; a few years after he had established himself as a wig-maker (not as a barber, as has been often said) in the High Street, and soon found himself in comfortable circumstances. They had six children. His eldest child was Allan Ramsay, the portrait painter.
Ramsay's first efforts in verse-making were inspired by the meetings of the Easy Club (founded in 1712), of which he was an original member; and in 1715 he became the Club Laureate. In the society of the members he assumed the name of "Isaac Bickerstaff," and later of "Gawin Douglas," the latter partly in memory of his maternal grandfather Douglas of Muthill (Perthshire), and partly to give point to his boast that he was a "poet sprung from a Douglas loin." The choice of the two names has some significance, when we consider his later literary life as the associate of the Queen Anne poets and as a collector of old Lowland Scots poetry.