David Elebert's second half header gave Accies their first win of the season and partly banished memories of last week's 6-0 thrashing at Gretna, but Dundee have now lost their opening three games under new player-manager Alex Rae.
The Dark Blues were briefly on top midway through the first half, but striker Bryan Deasley failed to get in a shot after outpacing Elebert. Solid defending then came to Hamilton's rescue when Gary McKenzie looked set to score. Accies then wasted a golden opportunity in the 35th minute as Spanish forward Javier Payo somehow managed to direct Mark McLaughlin's shot over the top from poin-blank range.
Three minutes later, Dundee's trialist goalkeeper did extremely well to hold a ferocious angled drive from Jim McArthur. Shortly before half time, man-of- the-match Mark Gilhaney cut in from the left and fired a 20-yard effort inches wide of the visitors' goal.
Gilhaney created what proved to be the winner early in the second period, crossing to the back post where Elebert headed powerfully home.
Dundee had the better of the closing exchanges, but a dipping long range shot from left-back Paul Dixon and a sweetly-struck volley by Rae which clipped the post was the closest they came to equalising.