Efforts from Sean Exley, Gaz Thomas and Sam Garnett put Pier 3-0 up at half-time, then a fourth by Isaac Sands early in the second period looked to have sewn up the win for Andy Spivey's team.
Sherburn worked hard throughout the game and gained their reward when teenager Harry Ward's diving header at the back post flew in, then a fine finish from Tristan Mustoe made it 4-2, but Rich Tolliday added a fifth to soothe any Pier nerves.
Veteran Dave Wedge scored a third for second-from-bottom Sherburn, who deserved credit for their battling display.
Spivey said: "It was a spirited performance from Sherburn as they kept going, We tired towards the end with Wednesday night's efforts against Edgehill taking its toll, and we just got over the line."
Phil Meads and Garnett were the men of the match for Pier, with teenagers Harry Walmsley and Joey Harris the leading performers for the villagers, both playing in central midfield.
Hunmanby United tightened their grip on third spot with a 3-0 win at Scalby.
United opened the scoring on the half-hour mark when Robbie Harrison slotted home after a fine through-ball from Ben Briggs.
Scalby battled hard and had a lot of possession without much joy in front of goal, and United made them pay as they added a second when player-boss Leigh Franks played James Pinder through and the forward fired home.
Franks smacked in a third goal from a free-kick on the edge of the box.
Scalby boss Sam Medd was proud of how his side played, stating it was their best performance of the season, a huge improvement since the last meeting between the two sides early on in the season, United having romped to an 11-0 win in that game. He awarded the man of the match to the whole team.
Tom Scales and Lee Cappleman scored two apiece as Newlands Reserves defeated Fishburn Park 5-1, the first win of the season for the Division Two basement club.
Sam Broadbent also notched for the home side, with Lee McLaughlin and Tyler Whiteman their star men.
Snainton missed out on the chance to reduce the gap between themselves and leaders Edgehill Reserves as they were pegged back to a 1-1 draw by promotion rivals Goldsborough United.
Rob Holt put Snainton in front as the hosts had the upper hand in the first half.
United came back into it after the break and levelled when Ben Watson's shot was fumbled in by the Snainton gloveman, and the home side had to hold on as United piled on the pressure in the final 20 minutes, the keeper making up for his earlier slip by tipping over Shane Bannister's late header.
Tyler Whitton was named as the man of the match for Snainton with Bannister the star man for United.
West Pier Reserves also stayed in the title race with a 3-0 home win against Cayton Athletic.
Player-manager Johnny McGough set up Zac Hansen for the opener for Pier, and Rob Whitehead then provided the assist for Brad Marshall to double the home side's lead before the break.
Whitehead then fired in a third goal to seal the win for Pier after the break, Gavin McGough the man of the match for Pier, who also had Mikey Anderson on top form.
Scarborough Saturday League
Scalby 0-3 Hunmanby; West Pier 5-3 Sherburn.
Newlands Reserves 5-1 Fishburn Park; Snainton 1-1 Goldsborough United; West Pier Reserves 3-0 Cayton Athletic.