The decisive TD toss capped a comeback in which the surging Colts (8-4) erased a 12-point deficit in the fourth quarter and logged their sixth win in seven games.
Luck (24-for-54, 391 yards, four touchdowns, three interceptions) hooked up with LaVon Brazill on a 41-yard scoring strike with 2:39 left in the game that narrowed Detroit's lead to five points.
Avery made two scoring grabs overall while Coby Fleener added a touchdown reception.
Calvin Johnson, NFC Offensive Player of the Month for November, had a career-high 13 catches for 171 yards and a touchdown for the Lions (4-8).
Johnson leads the NFL with 1,428 receiving yards -- 420 short of Jerry Rice's 1995 league record.
Matthew Stafford went 27-of-46 through the air for 313 yards, two touchdowns and an interception as Detroit dropped its fourth straight game.