The Liverpool-born striker was allowed to leave Dale at the end of last season having only arrived at the club on a permanent deal in January following a loan spell from Shrewsbury.
Manager Mark Yates is delighted to have landed the 23-year-old, who started his career at Tranmere, and is eager to bring in more fresh faces.
"Terry is a good player with a good track record," Yates told the club's official website.
"He has been on our radar before and I've made a couple of enquiries but he certainly offers us something a little different to what we already have."
The deal will keep Gornell at the Abbey Business stadium until the summer of 2015 and he has been allocated the number 10 shirt.