Maxime Talbot, Matt Read and Claude Giroux also scored for the Flyers, who moved within two points of the idle New York Rangers and New York Islanders for the final playoff spot in the Eastern Conference.
The Capitals are a point ahead of Philadelphia in a jumbled East.
Desperate to get a point, the Flyers tied it at 4 when Timonen ripped a slap shot past Braden Holtby after several chances in front. Timonen then set up Fedotenko with a perfect crossing pass in OT to cap off a remarkable comeback and set off a wild celebration.
Marcus Johansson and Alex Ovechkin scored power-play goals 26 seconds apart in the third period to give the Capitals a 4-2 lead.