Atalanta bounced back from a rough stretch to remain in the chase for Champions League qualification.