ATK drew first blood with their first major sight of goal in the 10th minute. John Johnson's cross-field ball found Roy Krishna on the left flank who delivered a good cross towards the edge of the box.
Hernandez, who was left unmarked, smashed a half-volley into the ground and beat goalkeeper Vishal Kaith to give ATK the lead.
ATK scored the all-important second goal and doubled their advantage two minutes into the second half.
Williams picked up the ball in midfield and fed Edu Garcia into the box. The Spanish midfielder beat Kaith with a neat finish from an acute angle to make it 2-0.
Valskis on top
Chennaiyin finally found a way past the ATK defence in the 69th minute. Laldinliana Renthlei played a neat one-two with Anirudh Thapa on the right before sending a cross into the centre of the box.
Pritam Kotal's headed clearance fell to Jerry Lalrinzuala who passed the ball to Valskis in the centre. The Lithuanian striker found the net with a powerful strike to score his 15th goal of the season and give Chennaiyin a lifeline.
ATK got their third goal of the night and struck the final blow in the last minute of injury time.
Substitute Pronay Halder lifted the ball over the Chennaiyin defence into the path of Hernandez who slotted the ball home.