Detroit trailed 2-0 going into the eighth, scoring on the tying run on a wild pitch.
Jhonny Peralta singled to open the Detroit 11th off Chad Jenkins (0-1) but he was retired on a fielder's choice and Berry was inserted as a pinch-runner. Berry stole third ahead of a walk to Jeff Baker.
Jenkins struck out Andy Dirks but Avila lined a single to right, getting Berry home easily.
Jackson also made a run-scoring, diving catch in center field in the 10th inning.
Joaquin Benoit (3-3) got the win with two-thirds of an inning of work.
Tigers starter Justin Verlander gave up just four hits -- one was a two-run home run by Edwin Encarnacion -- while walking two and striking out 12 over nine innings. That allowed him to pass teammate Max Scherzer for the major-league lead in strikeouts with 192.
Encarnacion's home run was his 33rd of the season.