Bartlett, signed last week from Darlington, kept out Bradley Wood’s 75th-minute spot-kick to earn the visitors a 3-2 triumph after York old boy Tom Platt had received his marching orders.
The Minstermen had been pegged back twice with goals from Aidan Connolly and Jon Parkin cancelled out by Cieron Keane and Brendon Daniels.
But Parkin’s 13th goal of the season – a 69th-minute penalty – put York within sight of victory as Platt also received a second yellow card after dragging down Gary Martin.
The visitors still needed heroics from Bartlett, though, to safeguard maximum points.
Connolly opened the scoring on 13 minutes when he steered Alex Whittle’s low cross in off an upright from 10 yards. Just past the half-hour mark, Alfreton drew level after Keane was left alone at the far post.
Parkin poked a five-yard effort past Chris Elliott following Connolly’s deep cross but, within four minutes, Daniels thumped a 35-yard free kick in off Bartlett’s bar.
Parkin went on to find Elliott’s bottom-left corner from 12 yards, which was something Wood could not emulate.
Harrogate Town missed out on an eighth straight away win after going down 3-1 at Spennymoor.
David Foley and Glen Taylor helped the north-east side forge in front and, despite Andew Nelson’s first goal for the visitors, Robert Ramshaw completed the scoring five minutes from the break.
Ten-man Bradford Park Avenue climbed into the play-off positions as top-scorer Oli Johnson sealed a 1-0 win at bottom-of-the-table North Ferriby, who saw a chance from Mark Gray ruled out for offside.
Adam Boyes also hit the bar for the visitors, who had Danny Boshell sent off in the second half.