The 26-year-old had been available on a free transfer after leaving Shrewsbury Town earlier this month.
A number of Football League clubs were linked with the defender, but Winfield has become York's sixth signing of the summer.
"I'm very excited about this new chapter of my career. It would be great to come here and achieve something," Winfield told the club's official website.
Winfield made 17 appearance for the Shrews last season.