Cam Atkinson scored, and Carter Hart made 26 saves for the Flyers (13-14-6), who went 1-2-1 on their four-game West Coast trip.
"When you're looking at the results, that's not good," Flyers coach Mike Yeo said. "Unfortunately, we're in a position where you're chasing everybody."
The Ducks took a 1-0 lead when Terry tipped in a one-timer from defenseman Hampus Lindholm at 3:21 of the first period.
Play did not immediately stop because the puck hit an interior post and banked out, but the goal was eventually reviewed and awarded to Terry.
"I didn't even mean to," Terry said of the deflection. "It just kind of went off my stick."
Terry skated ahead of the Philadelphia defense and scored his 20th goal of the season at 9:41 to make it 2-0.
"I've really just been trying to move my feet in the first periods, and just kind of get them under me and get going," Terry said. "I was able to get a step on [the defense] and, luckily, I was able to finish that one too."
Atkinson redirected a pass by Joel Farabee to bring the Flyers within 2-1 at 18:42.
"It's really difficult to sit here and say, 'Oh, we did this well or we did that well.'" Yeo said. "The bottom line is we need to grind some points out. We've got to stay with the pack."
Anaheim went on a power play when Morgan Frost was called for goalie interference, and Milano scored off a feed from Sam Steel to make it 3-1 at 17:49 of the second.