Anaheim produced the three goals in the span of 7:44 to come back from a 2-1 deficit and snap a three-game losing streak. It was the 11th win of the season for the Ducks, moving them out of a tie with Columbus for fewest in the league.
Ryan, who produced Anaheim's first score with 5:42 left in the second period, tied the game with a shorthanded goal midway through the third.
Getzlaf put the Ducks in front with a backhander and Selanne provided insurance with his 12th of the season.
Jonas Hiller made 19 saves to get the victory.
Evgeni Nabokov allowed all four Anaheim goals on just 24 shots.
The Islanders had won three in a row to equal its longest winning streak of the season. Their other three-game winning streak came during the first week of the campaign.