It was Ireland's only win of the tournament and they were made to work from it, with Scotland soaring to a 17-9 lead at the interval.
Scotland started the brighter of the teams, with Cumnock centre Mark Bennett particularly impressive, controlling most aspects of the game.
A try from Brighton College fly-half Harry Leonard in addition to four Bennett penalties looked to have put the game beyond Ireland, but a penalty from Pat Jackson and a drop-goal from Richie McMaster kept them within range.
The Irish management freshened the side with some astute changes and they soon saw the rewards in a fruitful three minutes which saw 14 points.
Replacement centre Peter Nelson and wing Sam Coghlan-Murray each scored converted tries, before full-back Ross Jones stormed through to cross the line.
Leonard looked to have set up a dramatic finish with his second try, but it was not enough as Ireland took the match as worthy winners.