The Northern Ireland international scored his 18th league goal of the season with 12 minutes remaining to seal all three points for John Hughes' side.
Both sides entered the match on the back of three-match winless streaks and it looked as if they would be heading into the break locked level.
Aaron Doran struck on the stroke of half-time for the visitors, though, silencing the home crowd at Dingwall.
Cardiff City loanee Filip Kiss levelled proceedings just five minutes into the second half, setting up an exciting finish.
But McKay stole the headlines, with his late winner taking his side to within two points of the fourth-placed Dundee United.
Inverness sit fifth and are now seven points clear of St Johnstone, who are sixth, while Ross County remain ninth.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.