The Ipswich Town defender struck with five minutes remaining after rising highest at the near post to connect with a Matt Ritchie corner.
With one eye on Sunday's crucial European Championship qualifier with Finland, Michael O'Neill rested a number of regular starters and handed a first senior cap to Manchester United youngster Paddy McNair.
Scotland threatened first, as early as the fourth minute, after Ikechi Anya cut the ball back for Steven Fletcher but 'keeper Michael McGovern reacted well to turn the effort over.
McGovern was in action again soon after to thwart an Anya drive before blocking another Fletcher effort on 20 minutes.
Indeed, McGovern was in top form and pulled off further first half saves to keep Northern Ireland very much in the game.
The visitors didn't create much in front of goal but did produce a solid defensive performance.
Scotland substitute Steven Naismith might have broken the deadlock on 49 minutes after fizzing a header wide from a Craig Forsyth delivery
Northern Ireland's first real effort of note arrived midway through the second half after Josh Magennis broke from the halfway line before sending an effort just wide of the right post.
After this both sides made a raft of changes which, as might have been expected, broke the momentum of the game.
However, just as it looked like Northern Ireland might have secured a hard earned draw up popped Berra to secure the win for the Scots.
Northern Ireland: McGovern, D. Lafferty, J. Evans, Baird, Dallas, Reeves, McNair, Hughes, Norwood, Magennis, Grigg subs Mannus (not used), C. McLaughlin (not used), McCullough (replaced Evans 81), Davis (replaced Norwood 69), McKay (replaced Magennis 75), K. Lafferty (not used), Brunt (not used), R. McLaughlin (replaced Reeves 70), McCourt (replaced Grigg 58), Ward (not used), Cathcart (not used), Hodson (replaced Baird 58)