The midfielder has penned a deal until the end of the season and could make his debut on Saturday.
Formerly of West Brom, Wilding joined Sunderland in the summer of 2020 and has been described as a player who likes to break up play.
He spent time on loan with National League North side Leamington earlier this season.
“Myself and Wess Brown watched him play for Sunderland’s Under-23s on Monday and were very impressed.
“He adds to our options in midfield for the run-in and I’m pleased with how strong the squad looks.
“Sam trained very well with us on Thursday and I’m sure he’s going to fit in nicely.
“We look forward to seeing him in a South Shields shirt.”
Tyrese Dyce has also departed on loan to Spennymoor Town.