Local boy Jake Day came off the bench to become the local hero for a frustrating Bridlington Town team and left Harrogate Railway devastated at leaking late goals for the second consecutive game when they appeared to be heading for a share of the points.
After an even first 10 minutes Town began to take control and Tim Taylor had a low shot saved by James Webster while Danny Buttle was proving a handful down the left with his speed and crossing ability.
Harrogate then enjoyed a good spell and James Hitchcock saved from Luke Stewart then punched away a cross from the right at full stretch.
After Agnew had spurned a gift presented to him by Harrogate defender Shane Hamilton the visitors took the lead four minutes before half-time with a controversial goal.
The ball was played to Stewart, who appeared to be three yards offside, but the flag stayed down and he went on to place it past Hitchcock.
The visitors started well in the second but it was Town who went close when Agnew just failed to connect with Taylor’s centre and Joel Sutton’s 20-yard free-kick was cleared.
Twelve minutes into the half Town replaced Taylor in favour of Day and within two minutes he brought them level when he was first to the ball after Agnew had struck the post.
Agnew was ruled marginally offside when he ran on to Dennison’s pass then with 20 minutes remaining his shot following a corner was palmed onto the bar by Webster and again Day reacted the quickest to put Town ahead.
Ten minutes from time Dan McDaid was cautioned for pulling back Sutton when he attempted to break from halfway and four minutes later Stewart got his second following a scramble in the Town area and a mix-up between Chris Jenkinson and the now-limping Hitchcock.
The game appeared to be heading for a draw but Day had other ideas and put the Seasiders back in front when he finished from a tight angle to complete a hat-trick after rounding Webster.
With time added on being played Day laid the ball back from a corner and Sutton found the top corner of the net from 25 yards.
Then two minutes later it was Day again when he ran clear to score Town’s fifth goal and earn an ovation from the Queensgate faithful.
Town boss Woodhouse said: “I think we dominated the first half, probably 70% possession to their 30% and they only had one shot and it went in and we find ourselves going in 1-0 down at the break.
“They punished us and at half-time I was thinking the gods are against us. It seems at the moment every time a team is having one chance and they are scoring it.
“In the second half we looked a different team and after we scored the first and then went ahead we looked like the only team who would win it. But then they score and make it 2-2 late on, and then we win it after that helter-skelter finish to the match.”
Keeper James Hitchcock injured his groin in the match but Woodhouse is confident he will recover for Saturday’s game at home to Liversedge.
Brid Town: Hitchcock, Lewis, Walters, Griffin, Jenkinson (c), Norburn, Sutton, Dennison, Agnew (Micklethwaite 87), Taylor (Day 57) (Adams 90+2), Buttle.
Unused subs: Papprill, Norfolk.
Harrogate RA: Webster, O’Connell, McDaid, Hamilton, Bassi, Wilson (c), Santos, Carter, Williams, Stewart, Eustance (Gray 70).
Unused subs: Murgatroyd, Ryan, Hendrie
Referee: David Jones.