The striker netted from 12 yards following a neat passing move to help maintain both his and Caley's fine start to the season and book their place in the fourth round.
Terry Butcher's Premiership leaders suffered their first defeat of the campaign at Aberdeen last weekend but they started strongly at Dens Park and took a deserved lead after just 11 minutes.
After some intricate passing cut the Dundee defence open, Richie Foran found McKay in space and the striker fired home his seventh goal of the season.
McKay's strike partner Nick Ross fluffed two opportunities to double Inverness' lead, his second shot coming back off the post, and the visitors were fortunate not to be back on level terms by the interval.
Dundee grew in confidence as the half progressed and they came close to levelling in the half's final moments, Dean Brill producing a stunning point-blank save to deny Craig Beattie.
McKay again went close in the early stages of the first half but his chipped effort was pushed onto the bar by Kyle Letheren, while Graeme Shinnie was off target from a free-kick.
But just like the first period, Inverness invited Dundee forward as the half progressed, with Ryan Conroy blasting a shot over the bar and Brill rising through a mass of bodies to punch clear.
Brill foiled Dundee yet again in the closing stages, making a fine low save to deny Conroy a late equaliser.