The 32-year-old has linked up with ex-Magpie Michael O'Neill's men, ending his six-year spell at St. James' Park.
Former Dagenham and Redbridge and Peterborough United striker Gayle joined United from Crystal Palace in July 2016 and enjoyed a goal-laden first season on Tyneside, netting 23 times in all competitions to finish as the club's leading goalscorer as Newcastle won the Championship title in 2016/17.
After scoring six times in the Premier League the following campaign, the frontman joined West Bromwich Albion on loan for the 2018/19 season and bagged a further 24 goals in a prolific stint at the Hawthorns before returning to Newcastle.
In all, Gayle made 122 appearances for the Magpies, scoring 34 times, and departs to join a Potters side who finished 14th in the second tier last term.
Newcastle United thanks Dwight for his contribution and service to the club, and wishes him well for the future.