Later named 'Vauxhall Man of the Match' Davis struck on 55 minutes at the second attempt after Craig Cathcart had provided the crucial crossfield pass to create the opening.
Northern Ireland started brightly with Davis teeing up Kyle Lafferty with an early chance while Jamie Ward then had a go from distance only for Latvian 'keeper Andris Vanins to prove equal to the challenge.
Then, with almost a quarter-of-an-hour gone, Ward tested Vanins again with a well executed left-foot strike from the edge of the area after a great ball from Chris Baird.
Latvia didn't create their first real chance until the half-hour mark courtesy of Oļegs Laizāns with a 30-yard drive which Michael McGovern eventually gathered.
At the other end Davis was in the thick of the action again, this time following a Stuart Dallas ball, but Vanins was alert to make the save.
Perhaps Northern Ireland's best chance arrived just after that - on 32 minutes - when Lafferty got on the end of a Davis through ball only to elect to take a shot himself rather than provide a lay-off for the much better placed Ward.
Lafferty created another opportunity for himself four minutes into the second half after teaming up with substitute Corry Evans to take the ball past two defenders before testing Vanins with his left-foot.
However, the goal that was to ensure Northern Ireland ended a seven-and-a-half year wait for a friendly win and stretched the current unbeaten run to eight games, came soon after when Cathcart provided that long distance ball for Davis to direct home at the far post after his initial close range header had been blocked by Vanins.
Davis might have added another not long after the hour mark with a dipping volley from around 25 yards.
With time running out, Latvia might have snatched an unwarranted late equaliser after substitute Artoms Rudņevs volleyed just wide from inside the area.
Northern Ireland: McGovern, McAuley, Cathcart, J. Evans, Dallas, McLaughlin, Davis, Baird, Norwood, Lafferty, Ward subs Ferguson (replaced Dallas 69), McGinn (not used), McKay (not used), Boyce (replaced Ward 69), Carroll (replaced McGovern 46), C. Evans (replaced Norwood 46), McCourt (replaced Davis 84), Hodson (not used), Magennis (replaced Lafferty 54), Mannus (not used)
Latvia: Vanins, Kurakins, Laizans, Gabovs, A Visnakovs, E Visnakovs, Gorkss, Rakels, Tarasovs, Zjuzins, Jagodinskis subs Rudnevs (replaced A. Visnakovs 59), Sabala (replaced E. Visnakovs 71), Maksimenko (not used), Kamess (replaced Rakels 85), Steinbors (replaced Vanins 73), Dubra (not used), Ikaunieks (replaced Laizans 78)