Aaron Doran had put the League Cup finalists ahead at Stair Park with five minutes to go before the break but Martin Grehan levelled from the spot on the stroke of half-time and Jamie Longworth put the League One side ahead.
However, McKay struck two minutes later to secure a 2-2 draw and a fifth-round replay and maintain Caley Thistle's hopes of a cup double.
Inverness knew they faced a game from early on when Stranraer missed a great chance in the opening moments. Grant Gallagher fed Sean Winter but, instead of shooting first time, the winger took a touch which allowed visiting goalkeeper Dean Brill to charge down the shot.
Longworth had Caley Thistle on the back foot again moments later as he wriggled free in the box but his cross was wasteful.
Ross Draper should have given the Highlanders a foothold in the match but he could only divert his free header straight at David Mitchell.
After the Blues' bright opening the match settled down and both teams were consigned to probing for space down the wings.
Steven Bell went close with two shots from distance that Brill was able to watch wide. The match threatened to drift towards the interval goalless before two goals brought it back to life.
A quick throw-in by Graeme Shinnie caught Bell unaware and the midfielder missed his header to allowed Doran a free run into the box. The winger kept his cool and curled his shot into the bottom corner, leaving Mitchell rooted to the spot.
Stranraer would have felt hard done by to go in behind at the break and they were handed a lifeline by referee Kevin Clancy. Grehan was hauled from behind by Shinnie just as he was about to convert a Longworth cross and the referee had no hesitation in pointing to the spot. The striker took the penalty himself and sent Brill the wrong way.
Inverness manager John Hughes wasted no time bringing on Richie Foran for his first game since suffering a shoulder injury against Aberdeen on December 21 in a bid to increase his attacking options.
Despite the extra forward the Scottish Premiership outfit still struggled to create attacking opportunities, although Stranraer skipper Frank McKeown threw himself in front of a McKay shot with Mitchell beaten.
Stranraer got the break all their hard work deserved midway through the half when Longworth pounced on a loose header on the halfway line. The hitman caught the Caley Thistle defence flat-footed and, despite Brill trying the close him down, he rifled his shot into the net for his 20th goal of the season.
The goal left Inverness shell-shocked but they regrouped quickly. McKay fired a warning shot from a corner before he nodded in from a Foran cutback.
Both teams brought on fresh legs as they pushed for a winner but both defences held strong to make the teams do it all again a week on Tuesday.