And the Bills equaled the number of wins Detroit has this season at its indoor stadium.
Buffalo (8-3) has won two straight — after losing two in a row — to move a half-game ahead of Miami in the AFC East.
After Bass made the game-winning kick, Allen and Diggs embraced on the sideline.
“Let's get back to having fun again," Diggs recalled telling Allen after making eight catches for 77 yards and a score. “We got away from that a little bit."
Allen threw a go-ahead, 5-yard touchdown pass to Diggs with 2:40 left, but Bass missed the extra point to make it 25-22 after the kicker matched his and the franchise record with six field goals in an eight-point win over the Browns on Sunday.
Allen had a passing and rushing touchdown in the first half, finishing 24 of 42 for 253 yards to more than make up for throwing his 11th interception of the season. He has accounted for 162 touchdowns, trailing only Hall of Famer Dan Marino's total of 171 for the most by an NFL player in his first five seasons.
The Lions converted fourth-and-1 from midfield with Amon-Ra St. Brown's 7-yard end-around to set up Michael Badgley's game-tying, 51-yard field goal with 23 seconds to go. Badgley missed a 29-yard field goal late in the third and Jared Goff took a sack for a safety in the same quarter and those mistakes proved to be costly.
Detroit (4-7) missed an opportunity to win four straight games for the first time since 2016 and lost a franchise-record sixth straight game on Thanksgiving.
”I told them this one should sting,” coach Dan Campbell said. “We had a chance to win and we didn’t make it, but I don’t think this was a step backward. I’m frustrated, but we’re getting better. ”
Buffalo defensive tackle Ed Oliver forced and recovered a fumble in the first half, leading to Allen's tiebreaking, 3-yard touchdown run in the second quarter. Oliver also sacked Goff for a safety, three plays after Allen threw an interception at the Detroit 4, to put the Bills ahead 19-14 early in the third quarter.
The Lions promoted linebacker James Houston from the practice squad and he became the first player in franchise history to have more than one sack in his NFL debut.
Allen’s interception in the third quarter was the sixth turnover for Buffalo in the red zone, surpassing the total it had the previous three seasons.
Bills: Edge rusher Von Miller (right knee) and LT Dion Dawkins (knee) left the game with injuries, and coach Sean McDermott said he didn't have an update on their status.
Lions: DE Julian Okwara (elbow) was hurt during the game and Campbell said CB Jerry Jacobs left the game after he felt dizzy.
Bills: Play at New England on Thursday night.
Lions: Play Jacksonville at home on Dec. 4.
AP NFL coverage: https://apnews.com/hub/nfl and https://twitter.com/AP_NFL