The lattice dynamic properties and spin-phonon coupling in DyMn$_2$O$_5$ are studied by using the density-functional theory. The calculated phonon frequencies are in very good agreement with experiments. We then compare the phonon modes calculated from different spin configurations. The results show that the phonon frequencies change substantially in different spin configurations, suggesting that the spin-phonon coupling in this material is very strong. Especially, the short range spin ordering has drastic effects on the highest Raman and IR phonon modes that might be responsible for the observed phonon anomalies near and above the magnetic phase transitions.