McKay finally broke the deadlock in the 77th minute when he bagged his seventh goal of the season to settle a turgid affair in the Highlands.
Blustery conditions hampered both sides in the early exchanges, but almost gifted a goal to the visitors. Dean Brill’s poor kick out allowed John McGinn a 40-yard effort, but his audacious lob carried just over.
Kenny McLean, subject of a reported £150,000 offer from Fleetwood, hit the bar with a 25-yard effort and was denied by a save from Brill before curling another long-range effort wide.
After a sustained period of St Mirren pressure, Inverness should have had the advantage just after the half-hour mark through McKay.
A Jeroen Tesselaar mix-up allowed the Inverness striker an opening, but as he attempted to round Mark Ridgers, the Buddies goalkeeper blocked McKay’s final left-footed lunge.
Inverness started the second half with purpose as Greg Tansey’s early corner on the left was almost met by Josh Meekings and Gary Warren.
The Inverness impetus soon petered out, though, with St Mirren seeking the opener.
Tansey was dispossessed midway inside his own half just before the hour mark as McLean found Steven Thompson but the former Rangers forward was denied by a fine challenge by Warren.
Caley Thistle looked to get back into the game, with McKay again unable to unleash a shot following a promising passage of play, the striker opting to allow Aaron Doran another crack which the Buddies defence blocked.
However, in the 77th minute David Raven raced down the right before laying the ball across the six-yard box for McKay to grab the winner.