Tony Romo had two interceptions in the final 3 minutes, the first one giving Green Bay a chance for the go-ahead score with the Cowboys in position to run out the clock with a 36-31 lead. Lacy scored with just over 1½ minutes left.
Playing on the same field where they won the 2011 Super Bowl, the Packers matched the 1982 team, which rallied past the Los Angeles Rams after trailing by 23.
The Packers (7-6-1) kept their playoff hopes alive with Aaron Rodgers possibly returning next week.
The Cowboys (7-7) stayed a game behind Philadelphia in the NFC East.