The magpies confirmed the news of their new acquisition on twitter.
Their tweet read:
25-year-old Dwight Gayle is an English forward who played for Alan Pardew's Newcastle United until last season. Gayle had appeared in 16 matches last year for Palace and scored just 3 goals.
The British striker started his career at Stansted FC and later played for Dagenham & Redbridge and Peterborough United. He had joined Crystal Palace in 2013.
After completing his move to Newcastle, Gayle said: "It's a dream come true to be at a big club like this.
"Newcastle has a massive fan base and a great history so it is amazing to be here.
"I can't wait to get started, prove myself and score the goals that take us back up to the Premier League. It's where this Club belongs."
Magpies boss Rafael Benitez also spoke about the new signing, he said: "Dwight is a great player, a proven goalscorer, and it is fantastic news that he has joined us.
"He has a big personality, a lot of energy and pace. He is a good finisher also, so he will add goals to our squad, for sure.
"He knows English football well, too, and that is important in the Championship.
"I am sure Dwight will want to prove he can make a big difference to our team and I am looking forward to working with him."
Newcastle were relegated from the Premier League last season after they finished 18th in the league getting just 37 points from the 38 matches. Steve McLaren was in charge of the team from the beginning of the season but due to a series of dismal performances he was sacked and replaced by Rafa Benitez.