Answer based on context:

Coming off their divisional home win over the Bengals, head coach John Harbaugh and the Ravens stayed at home for a Week 12 interconference duel with the San Francisco 49ers and their head coach (John's brother) Jim Harbaugh, on Thanksgiving. (The game was jokingly nicknamed "The Harbaugh Bowl.") Baltimore delivered the game's opening punch in the first quarter with a 39-yard field goal from kicker Billy Cundiff, but the 49ers answered with kicker David Akers getting a 45-yard field goal.  The Ravens regained the lead in the second quarter with a 23-yard field goal from Cundiff. San Francisco began the third quarter with Akers nailing a 52-yard field goal, yet Baltimore regained the lead in the fourth quarter with quarterback Joe Flacco finding tight end Dennis Pitta on an 8-yard touchdown pass, followed by a 39-yard field goal from Cundiff.  Afterwards, the defense would hold to prevent any comeback attempt from the 49ers. Linebacker Terrell Suggs (3 tackles, 3 sacks, & 1 forced fumble) was named NFL Network's Puddin' Pie Award winner.

Who was ahead 2nd quarter?
The Ravens