A late Lewis Reeves strike separated the sides and ensured the competition’s holders were knocked out at the hurdle.
Town made several changes to the side with goalkeeper Nick Cranston being awarded his first competitive start for the Seasiders. Recent arrival Layton Watts was also given a start, along with local lad Alfie Jackson.
Whitby immediately took control of the game with Alfie Steel stinging the palms of Ayton’s shot-stopper six minutes in.
The Blues’ best chance of the half came in the 18th minute after some lovely work from Stephen Walker down the wing enabled a cross for Watts, who cannoned an effort against the crossbar from just a matter of yards out.
Watts looked lively and saw a free-kick tipped over shortly after hitting the bar, while Alfie Doherty, Connor Simpson and Joe Gibson all tested Jay Baker, though the Ayton gloveman left them all frustrated with stops going into the interval.
Newly-signed teenager Rocco Stamp would come on for his club debut replacing Watts with 66 minutes gone, though it would be the hosts - five levels below the Seasiders in the pyramid - who struck, after Whitby’s struggles to break down Ayton’s compact backline continued.
Reeves’ free-kick from twenty yards 13 minutes from time took a wicked deflection sailing into the back of the net leaving Cranston, who had not put a foot wrong all night, frustrated in goal as it passed him to ensure the hosts came away with a famous victory.