The Texans improved to a league-best 10-1 and won on the road for a franchise-record fifth straight time. Houston is only one victory away from clinching a playoff spot.
Detroit (4-7), which has been hosting a game on Thanksgiving since 1945, lost on the holiday for the ninth straight year.
Houston's Arian Foster scored his second touchdown of the game on a 1-yard run with 1:55 to play in regulation, ending a 15-play, 97-yard drive that forged a 31-31 tie.
Both Graham and Detroit's Jason Hanson missed field goal attempts in the overtime before Graham made his game-winning kick. Houston won in overtime for the second time in four days, having defeated Jacksonville last Sunday in the extra period on a 48-yard pass from Matt Schaub to Andre Johnson.
Schaub, who threw for 527 yards and five touchdowns against Jacksonville, went 29-of-48 for 315 yards and one score against the Lions.
Detroit quarterback Matt Stafford completed 31-of-61 passes for 441 yards and two touchdowns. Johnson made eight catches for 140 yards and a score.
The Texans, who reached the playoffs last year for the first time in franchise history, can actually earn a playoff spot this weekend if Tennessee, Miami, the New York Jets, Cincinnati and either San Diego or Pittsburgh all lose.
Houston's only loss this year came at home against Green Bay in the sixth week of the season.
Aaron Carter is still in love with Hilary Duff
Ray Liotta sues skin care company over use of likeness