McKay had given his side the lead on 36 minutes before Josh Magennis drew the home side level just seconds before the break.
The 22-year-old Dons ace then struck five minutes after the interval after chipping the ball beyond Antonio Roguero in the Caley goal.
However, the lead was to last just eight minutes as Warren rose to connect with Aaron Doran's corner to bring the Highlanders level.
And the comeback was complete on 82 minutes after Russell Anderson misjudged a long ball before putting it on a plate for McKay, who slotted past Jamie Langfield.
It sends Caley on to 25 points with Celtic, who have two games in hand, with Aberdeen staying a point behind with Hibernian and Motherwell.