Baltimore improved to 7-5 and boosted its chances for a spot in the postseason. The Lions, meanwhile, fell to 6-6 and will need some help to keep their playoff hopes alive.
Detroit trailed 20-0 at the half, but Matthew Stafford completed 20 consecutive passes to help the Lions get back in the game.
The Lions got on the board on the first drive of the third quarter on a 4-yard run by Theo Riddick. Another 6-yard scoring run by Tion Green cut the margin to 23-13 after Matt Prater missed the extra point.
Baltimore responded with a nine-play, 74-yard drive, capped by a 7-yard run by Collins. However, the Lions roared back on the next possession and Stafford pulled them to within 27-20 with a 1-yard pass to Nick Bellore.
A 51-yard field goal by Justin Tucker gave the Ravens some breathing room with 6:54 left in the game. The Ravens then pulled away after rookie Marlon Humphrey's interception at the Lions' 31. That set up a 6-yard run by Collins, increasing the lead 37-20.
Stafford suffered an injury to his right hand on the play and did not return. He completed 24 of 29 passes for 292 yards with a touchdown and an interception. Backup Jake Rudock entered the game and threw an interception to safety Eric Weddle, who returned the ball 45 yards for the score.
Flacco was 23 of 36 for 269 yards. Mike Wallace caught five passes for 116 yards.
The Ravens tied a team record with 24 points in the fourth quarter.
Tucker gave Baltimore the early lead with a 38-yard field goal. Prater missed a 43-yard attempt for the Lions. It was his first miss from inside 50 yards this season.
That proved to be costly as Flacco hit Wallace with a 66-yard pass on the next play. Flacco then found tight end Benjamin Watson on a 1-yard touchdown pass for a 10-0 lead with 11:52 left in the half.
On the ensuing possession, Weddle forced a fumble on a sack of Stafford and defensive tackle Willie Henry recovered the ball on the Lions 36. Baltimore has forced 27 turnovers this season.
Flacco then found fullback Patrick Ricard for a 3-yard score, boosting the lead to 17-0 with 6:54 remaining in the second quarter.
NOTES: Baltimore suffered a blow when starting CB Jimmy Smith suffered an Achilles injury late in the second quarter and could not return. Smith is the Ravens' top player in the secondary. ... The Lions' running attack took a hit when Ameer Abdullah (neck) was inactive. He leads the team with 505 rushing yards and three touchdowns. ... Ravens WR Breshad Perriman, the team's first-round pick in 2015, was a healthy scratch for the second time in three weeks.