The 22-year-old scored 13 goals in 29 league games after signing from Dagenham and Redbridge last summer, but could not stop Darren Ferguson's side from being relegated to League One.
Gayle moved to the Daggers in 2011 from Stansted, of the Essex Senior League, and has now gone from the ninth tier of English football to the Premier League in the space of two years.
"I'm ecstatic really. I just want to get pre-season started now," he told Palace's official website.
"The chance came and I had to grab it because I might not get another chance. To be playing in the Premier League from where I’ve come from is a big achievement really.
"I’m just really looking forward to it and hopefully I can take the opportunity with both hands and do well.”
Gayle is also looking forward to working under Palace boss Ian Holloway, who has already sung the young striker's praises.
"He’s a good manager and for him to point out my talent and my ability is a good feeling," he added. "I just hope I can repay him with goals for the club and help them stay in the Premier League.
"He’s built a very attacking side, which is what you need really. You need to score goals to win games to keep you up and to win trophies, which he proved last season."