Scotland's prospects looked bleak as the Baa-Baas crossed for two tries within the first ten minutes. But after threatening to be overrun, the home side fought back well.
James McLaren dashed over after good work from Glasgow's Jon Petrie but Scotland still trailed 24-8 at half-time.
Scotland remained camped on the Baa-Baas 22, but lacked the pace and penetration to seriously trouble the visitors.
Their persistence paid off in the 67th minute though when Glenn Metcalfe powered over under the posts after a quickly-taken penalty from Edinburgh scrum-half Mike Blair.
Glasgow's Rory Kerr and Andy Henderson got a run late in the game, the latter having been called up to the Scotland bench after initially missing out on selection.