Wilson, 26, is the son of former Chelsea and Notts County player Kevin Wilson and most recently played for Telford United. He is a former Northern Ireland youth international.
Grantham left Basford for Hednesford four weeks ago but now returns to the club where he was a great favourite.
Basford manager Liam Hearn said: "We're delighted to sign Ryan, he has great ability and is a real box-to-box player who can play in midfield or at the back.
"It's great that Courey is back, he is a real character and has great potential.
"With the signing of Brad Gascoigne last week, we've strengthened the side at the back and up front, people are talking about a possible push for the play-offs but we are taking one game at a time and seeing where that takes us."