Ex-Pilgrim David Ferguson scored the only goal of the game on 73 minutes as the Minstermen bolstered their play-off hopes.
United's afternoon went from bad to worse when Andi Thanoj and Ben Middleton were sent off in the closing stages, moments after Simon Heslop had received his own marching orders for City.