The home side had the best of the first half and deserved the lead given to them by left-back Kevin Holt’s 18th minute drive.
Accies improved after the break but spurned the chance to level in the 86th minute when skipper Dougie Imrie saw his penalty saved by Dundee keeper Elliot Parish.
With two games remaining Dundee are six points and nine goals better off than Partick Thistle who occupy the play-off spot.
However, McCann, who revealed Mark O’Hara lost his two front teeth in a clash with Danny Redmond which led to him staying in at the interval.
McCann said: “Clearly we are safe from automatic (relegation) but there is still work to be done.
“We have put ourselves in a really good position. I have told them in there, no over-celebration and to be fair they weren’t.
“They are rightly happy with the result because it takes us clear (of automatic relegation) but the job is not totally done yet and you cannot be too complacent or take anything for granted.
“We will go up to the Highlands on Tuesday (to play Ross County) and try to get three points.”
McCann admitted some concern when Accies were awarded a spot kick after debutant Daniel Jefferies, on as a second half substitute, clattered into Hamilton striker Marios Ogkmpoe.
He said: “When the penalty was given I thought, ‘here we go again’.
“You need everybody at some stage of the season to come up with something big.
“You are hoping that your keeper makes the save. I think Dougie Imrie changed his penalty from last week (against Ross County) but Elliot guessed right and it was a pivotal moment in the match.
“I never celebrated too much when he made the save because there is still time and you don’t want to be left with egg on your face.”
Accies remain three points and 13 goals better off than Thistle and five ahead of bottom side County and boss Martin Canning is confident of avoiding the drop.
He said: “We knew before today we had to win one game before the end of the season and that is still the same.
“We have a home game against St Johnstone on Tuesday and we have to go again.
“If we can win that, regardless of what happens elsewhere, that would put us (at least) three points above Partick Thistle going into the last game with a far superior goal difference. It should be enough.”
On Imrie’s penalty miss, Canning said: “Dougie has been great all season and it’s the first one he has missed all season.
“He is gutted but there is nothing anyone can say to him to change that. It is part of the game. We will stick together and go again on Tuesday.”