The league leaders stretched their unbeaten run to 25 games after scoring two goals in added time through goalmouth scrambles following long throws into the box.
Prior to that Blues had defended resolutely for 80 minutes and taken their chances to put themselves in a great position to end the Nottingham-based sides run.
Manager Neil Baker rung the changes from Monday's defeat at Market Drayton Town by bringing back Rob Stevenson, Jordan Johnson, Niall Maguire and Jordan Lemon to his starting line-up.
Basford had the better of the opening exchanges, but it was Blues who came the closest to scoring when Johnson found himself through on goal on 14 minutes.
He slotted past Saul Deeney in the Basford goal but Dominic Roma got back to clear the ball off the line.
In the 20th minute Ben Chapman was tested when he got down low to push away a shot from Connor Bartle for a corner.
Five minutes later Chapman was in action again as he saved well from a low Liam Hearn shot.
Blues took the lead in spectacular fashion on 38 minutes when Sam Grimshaw cut in from the left and curled a fantastic shot into the far corner from 18 yards for his fourth goal in as many games.
As the second half unfolded the expected onslaught from the home side did not really materialise as Leek continued to defend well, limiting Basford's opportunities whilst still looking dangerous on the break.
The home side went close on 70 minutes when a cross to the far post was hit into the side netting at close range by Rob Duffy.
A minute later Stevenson had a chance at the other end but his shot was saved by the feet of Deeney.
However, in the 76th minute Leek did extend their lead when Johnson beat the offside trap, rounded Deeney and slotted home into the empty net.
It needed something special for Basford to get back into the game and that's exactly what they got when substitute Aidan Austin curled a superb 30 yard effort around and over an outstretched Chapman.
It was backs to the wall for Blues after that and they held on until the 90th minute when Bartle launched a massive throw from the right which was allowed to bounce in the area and Hearn bundled home the ball from four yards.
There were four added minutes and in the last of those another long throw was launched from the left and this time it was Duffy who netted from close range to spark delirious scenes from the home players and supporters.
This was a cruel, cruel defeat for Town, but if they can take the positives from the performance and apply these to the remainder of the seasons fixtures there still could be much to play for.
View the match photos here.
Team: Chapman, Lemon, Green, Grocott, Lycett, Chadwick, Maguire, Davies (Crawford, 77), Johnson (Kearns, 90), Grimshaw (Grice, 86), Stevenson
Unused subs: Shelley, Trickett-Smith
Some photos courtesy of Basford United FC Twitter
Updated 13:57 - 12 Jan 2018 by Stevie R