Mike Green cut Washington's deficit to 4-2 with 8:40 remaining, and Dmitry Orlov pulled the Capitals within one with 3:31 to go. The two defensemen scored on long slap shots.
Ovechkin then tied it with his NHL-leading 28th goal. He also scored in the first period
In the shootout, Eric Fehr and Nicklas Backstrom for Washington and Grubauer made two saves on three shots to give Washington an improbable victory in the first meeting of the teams since they brawled at the end of the Capitals' 7-0 victory in Philadelphia on Nov. 1.
Claude Giroux, Mark Streit, Sean Couturier and Jacob Voracek scored for Philadelphia, and Michael Raffl had three assists.
Washington's Michael Latta and Philadelphia's Zac Rinaldo traded punches and were sent off in the second period. Early in the third, the Capitals Steve Oleksy and the Flyers' Wayne Simmonds received majors for fighting. The teams will meet again Tuesday night in Philadelphia.
The primary combatants from Nov. 1 in a rare fight between goalies - the Capitals' Braden Holtby and the Flyers' Ray Emery - were on the bench. Steve Mason had 29 saves for Philadelphia. and Grubauer stopped 24 shots for Washington.
NOTES: The Capitals have moved Brooks Laich to the long-term injured reserve list retroactive to Nov. 27 because of a strained groin. Sunday was the eighth straight game Laich has missed. He would be eligible to return Dec. 22. The 30-year-old center played only nine games last season as he battled a similar injury, leading to sports hernia surgery in April. Laich's problems continued in September when he left the ice with a strained hip flexor in the first 10 minutes of the Capitals' opening preseason practice. ... The Capitals recalled center Michael Latta from Hershey and activated defenseman John Erskine, who had missed 21 games with a knee injury. Defenseman Nate Schmidt was sent back to Hershey.