The NCEL Division One leaders won 3-2 at Premier Division outfit Garforth Town on Saturday thanks to the defender’s 98th-minute goal.
Boro had looked in control as they took a two-goal lead into the interval, but a second-half revival aided by the dismissal of Simon Parkes saw Garforth able to force the extra half-hour, only for Anderson to seal the visitors’ progress.
A strong wind on the day was a factor throughout, but Knaresborough settled quickly and Dom Wilson saw a shot blocked after Conor Donoghue headed the ball on.
Brad Walker then had an effort saved by Pete Lawrie in the home goal and Ben Cohen fired over the top before Will Lenehan had to head a free-kick from Garforth’s Luke Kitson off his own goal-line.
Ben Cohen put the away side ahead in the 15th minute after Blaine Hobson’s low cross from the right side evaded Walker on the six-yard line and Boro continued to press their hosts at every opportunity.
A great move down the left involving Donoghue, Cohen and then Walker ended with Hobson pushing his shot wide of the back post before Donoghue saw a header saved by Lawrie.
Cohen hit the side-netting after a Simon Parkes cross and then another Donoghue effort was deflected over before a second goal arrived in the 44th minute.
A corner from Simon Parkes on the right was cleared as far as Anderson who swung the ball back into the danger area for Hobson to fire home.
The weather worsened after half-time with the wind blowing harder and torrential rain poring for most of the remainder of the game.
Walker and Donoghue shot wide before Lawrie saved from Walker, but Garforth came back into the game and when a 74th-minute free-kick was not fully cleared, a centre from the left was headed home by Dan Coupland.
At the other end, Lenehan had a header saved and Cohen was wide as Knaresborough sought to relieve the pressure by pushing forward, but the game erupted in the 81st minute when Simon Parkes was sent off for a push and Garforth’s Callum Ward was cautioned.
The numerical advantage looked to have aided the home side when substitute Jamie Reeson equalised in the second minute of added-time, but Boro still had chances before the final whistle as Donoghue headed into the side-netting and Cohen shot at Lawrie.
Extra-time arrived and Garforth initially looked favourites to progress as firstly Reeson shot over and then Dan Atkinson was force to save from James Beaston.
The game’s decisive goal came in the 98th minute, however, and it arrived at the home end when a Donoghue free-kick was headed down by Lenehan and Anderson steered home the loose ball to the delight of a large Boro following, most of whom were by this point soaked to the skin by the heavy rain.
Further cautions followed and Garforth’s Jack McMurrough eventually received a second yellow card to level the teams at 10 aside.
Just before the dismissal, Aiden Kearsley had struck the bar for the hosts, but there was still time for Ben Parkes to bring the best out of Lawrie, who somehow managed to turn through 360 degrees to turn away the visiting midfielder’s lob, which looked to be goalbound.
Stansfield’s men had already done enough, however, and will take their place in Monday afternoon’s draw for round two.