The 22-year-old was released by United earlier this month having not made a first-team appearance for the club.
Willock spent loan spells with Crawley Town and Scottish Premiership side St Mirren during the 2018-19 season.
"He is destined for greater things and we've beaten off some very significant interest from Championship clubs," boss Steve Evans told the club website.
"He is nothing short of an outstanding talent. During my brief time as manager, this is the signing that excites me the most given his ability, stature, strength and unbelievable reference from United legend Nicky Butt."
Willock added: "I've been on loan for the last two years so I wanted to carry on with my development, play men's football and I thought this was the perfect opportunity."