The incident happened near Fifth Avenue in Brentwood.
Suffolk police officers, who saw the incident, immediately called for a block on the tracks, according to railroad spokesman Rich Mendelson.
The dog was pulled safely from the tracks, its owner was also removed safely from the track right-of-way, officials said. The train, the 11:11 a.m. from Ronkonkoma, due into Penn Station at 12:32 p.m., was delayed about 12 minutes.
"There was a dog on the tracks and a person was going after it," Mendelson said.
It was not clear what kind of dog was involved.
No one was injured, he said.