
The Seasiders made a bright start and nearly struck inside three minutes. Lewis Hawkins picked up possession on the edge of the area and drilled a fierce effort just over the crossbar as Whitby signalled their intent early on.
The game quickly opened up into an end-to-end contest. On five minutes, Gainsborough's Sisa Tuntulwana was slipped in behind the Whitby defence, forcing Isaac Allan into a smart save to keep the scores level. Adam Gell then tried his luck from range two minutes later, his lofted effort clearing the bar as Whitby pressed for an opener themselves.
Gainsborough responded with further spells of pressure, and Alex Nelson produced a fantastic challenge on 21 minutes to deny Jonathan Margetts a clear sight of goal, timing his intervention to perfection when it mattered most.
But the breakthrough arrived two minutes later - and it was Whitby who netted. From a corner, Layton Watts delivered low into the box, Frankie Whelan flicked on cleverly, and Matthew Tymon was perfectly placed to guide a poacher’s finish into the bottom corner.
Whitby had to withstand a strong response. Sustained Gainsborough pressure on 34 minutes saw the ball somehow bundled behind by Janelle Clarke, and further danger followed before the break. George Hornshaw was denied by a brave Aaron Haswell block, while Ashley Jackson saw an effort saved as the visitors pushed hard for an equaliser.
When it looked as though Whitby would carry their lead into the interval, Gainsborough struck. On the stroke of half-time, Tuntulwana levelled to make it 1-1 after racing in behind, ensuring the sides went in all square after an open first period.
Whitby began the second half with intent. Donald Chimalilo was twice denied by David Robson with back-post headers on 49 minutes, the Gainsborough goalkeeper reacting sharply to preserve parity.
Layton Watts forced a speculative save from Robson on 62 minutes, and attack-minded substitutions in the form of the introduction of Ben Farrar and Jarrett Rivers followed as the Seasiders looked to regain the initiative.
There were chances at both ends. Henry Brown passed narrowly wide following a mistake from Allan on 71 minutes, while Tuntulwana drilled just wide via a deflection a minute later as the visitors threatened on the counter.
Chimalilo then produced a mazy run through the Gainsborough defence on 86 minutes, only to see his eventual effort well defended.
But it was Gainsborough who delivered the decisive blow. Deep into stoppage time, Jackson found the net to snatch victory at the death, silencing the home crowd and leaving Whitby stunned.
After a contest full of commitment and fine margins, it was cruel conclusion for the Seasiders, who will feel they deserved more from the midweek encounter.