"We've got some work to do to catch up with them," Flyers coach John Stevens said.
The Red Wings are the defending Stanley Cup champions and have the most points in the NHL this season. Philadelphia is tied for second in the Atlantic Division.
Franzen made it 2-2 at 9:47 of the third period with his 29th goal. It was set up by Datsyuk, who got to a puck along the left wing boards and avoided defenseman Ryan Parent at the same time. Datsyuk then sent a cross-ice pass to Franzen, who put a shot over the sprawling Biron.
"It was Pav all over the ice," Osgood said. "Making great plays, backchecking, stealing pucks."
Zetterberg broke the tie with 8:41 left when he scored from the left circle, his 29th goal.
"This game's fair. If you do things right and do them right longer, you tend to win more often," Detroit coach Mike Babcock said. "We made a mistake a couple times and they scored on their chances, but I thought it was fair. The team that stuck with it the longest got a win tonight."
Philadelphia held a 2-1 lead after two periods.
Lupul's 21st goal gave the Flyers a 2-0 lead 4:28 into the second period. He beat Osgood from the right circle with a snap shot.
Datsyuk put the Red Wings on the board with 2:33 left in the second with his 28th goal, beating Biron high on the short side with a wrist shot from the outside edge of the left circle.
"It was just a great shot," Biron said. "I didn't give him much, I didn't think I gave him much. It was just a great shot.
"It's a different game if it's 2-0 after two," he said.
Philadelphia led 1-0 after the first period despite being outshot 19-8.
Hartnell opened the scoring with 3:26 left when he took a long pass from Braydon Coburn for a partial breakaway and, while holding off Marian Hossa, beat Osgood. It was Hartnell's 26th goal.
The Flyers had trailed after the first period in their previous 11 games.
Center Kris Draper played his 1,000th game for the Red Wings. He joins Gordie Howe, Alex Delvecchio, Steve Yzerman and current captain Nicklas Lidstrom as the only players to reach the mark with Detroit. ... Philadelphia center Jeff Carter played his 201st consecutive game. ... The Red Wings were without right winger Tomas Holmstrom (strained knee) and center Valtteri Filppula (back spasms). ... Datsyuk stretched his point streak to six games (three goals and six assists). ... The teams last met on Feb. 12, 2007, a 6-1 Philadelphia home win.
Copyright by STATS LLC and The Associated Press
Arena: Joe Louis Arena Location: Detroit, Michigan
Referees: Dennis LaRue, Brad Watson Linesmen: Mark Shewchyk, Scott Cherrey
Attendance: 20,066 (100.0% full)
Team Stat Comparison
Power Play Goals
Power Play Opportunities
Shots on Goal
Scott Hartnell (26)
Assist: Braydon Coburn
Joffrey Lupul (21)
Assists: Jeff Carter, Scott Hartnell
Pavel Datsyuk (28)
Assist: Johan Franzen
Johan Franzen (29)
Assists: Pavel Datsyuk, Brad Stuart
Henrik Zetterberg (29)
Assists: Mikael Samuelsson, Jonathan Ericsson