Pašalić curled the winning goal into the top right corner in the 59th minute. It was his first touch, 19 seconds after replacing Duván Zapata.
Atalanta consolidated fourth place and the final Champions League qualifying berth, extending its advantage over fifth-place Roma to six points.
The visitors took the lead on the stroke of halftime. José Luis Palomino failed to control a back pass and Edin Džeko stole the ball and fired past Atalanta goalkeeper Pierluigi Gollini.
Palomino atoned for his error five minutes