McKay's second, in the 82nd minute, earned Caley victory at the expense of the Dons, for whom Josh Magennis also scored twice.
McKay had earlier given his side the lead but they had to come from behind at Pittodrie after Magennis struck twice in five minutes.
Motherwell recorded their third successive away victory in the Clydesdale Bank Premier League with a 2-1 success over Dundee United at Tannadice.
Michael Higdon capitalised on hesitancy amongst the home defence to fire the visitors ahead after seven minutes.
A wonderful 20-yard strike from Chris Humphrey doubled the Fir Park side's advantage three minutes later but Jon Daly netted his fifth goal of the season to reduce the deficit before half-time.
Motherwell survived a barrage of second-half pressure to clinch all three points.
Ross County and St Mirren settled for a point apiece in an entertaining goalless draw at Global Energy Stadium.
The teams produced nine goals the last time they met but although there were no goals on this occasion the match was not short on incident.
County's Sam Morrow headed against the crossbar in the first half and the visitors twice thought they had broken through in the second, with Sam Parkin denied by a post and John McGinn's effort cleared off the line.