Luke Summerfield’s deflected 67th-minute strike moved the Minstermen nine points clear of the relegation zone after defender Dave Winfield had been sent off on the stroke of half-time.
An even first half saw Nicky Featherstone go closest for Hartlepool with a low drive across Michael Ingham’s goal after cutting in from the right flank.
Michael Coulson, meanwhile, lifted a glorious six-yard chance over for the hosts.
York then saw centre-back Winfield red carded on 44 minutes when he flew into a tackle on Brad Walker 20 yards from goal.
However Russ Wilcox’s men displayed great spirit to clinch victory when Summerfield’s speculative 30-yard drive nicked off David Mirfin’s head to deceive Pool keeper Scott Flinders.
Scott Fenwick went on to head the visitors’ best chance of an equaliser over in the fifth minute of stoppage time to leave Pools hovering above the bottom two.