Gagner, who has played centre but could become a full-time winger, has two years left on his contract at a cap hit of US$4.8 million.
The 24-year-old had long been the subject of trade rumours with Edmonton mulling changes amid a long playoff drought.
Purcell, a 28-year-old right-winger, has two years left at a cap hit of $4.5 million. He had 12 goals and 30 assists in 81 games this past season.
This trade represents another change for the Oilers as general manager Craig MacTavish seeks to get a young core built around Ryan Nugent-Hopkins, Taylor Hall and Jordan Eberle to the playoffs for the first time.
Gagner, the sixth overall pick in 2007, had 10 goals and 27 assists in 67 games in 2013-14. In his NHL career, all with Edmonton, the London, Ont., native has 295 points in 481 games.
Purcell, a native of St. John's, Nfld., has 228 points in 401 career games and 18 in 22 playoff games.