It was the Accies' first win in six matches, while Livingston are now without a victory from their last four games.
Hamilton made two changes from the side that had drawn with St Mirren. Steve Davies came in for the suspended George Oakley for his first league appearance of the season, while Ronan Hughes replaced Will Collar.
Livingston made four changes from the team knocked out of the Betfred Cup by Rangers in midweek. In came Stewart, Lithgow, Jack Stobbs and Scott Robinson for Matija Sarkic, Jack McMillan, Keaghan Jacobs and Lyndon Dykes.
Lithgow had missed the cup tie with a hamstring injury but made an early impression on his return to the side.
Accies responded with a dead ball of their own, Ogkmpoe stooping to meet Alston's corner but unable to get his header on target.
It was a game lacking in any real quality as both sides struggled to create an opening. Souda almost forged a chance for himself late in the first half, dribbling through some half-hearted tackles but shooting weakly at the end of the run.
Livingston would pay for their profligacy in front of goal when the home side drew level just before half-time. Alex Gogic's long throw-in was flicked on by Davies and, after Livi failed to clear, Alston bundled the ball home from close range.
The second half was as stodgy as the first. Souda tried to do the spectacular to put his side back in front but made a complete mess of his attempted bicycle kick, before setting up substitute Scott TIffoney whose header went over the top.
Substitute Mickel Miller could have won it for Accies but blazed his shot high over the bar before Cunningham spared his team-mate's blushes with a cool penalty down the middle.