You will have a song
"You will sing"
as in the night when a holy feast is observed
This simile emphasizes how happy the people will be.
gladness of heart
"you will be glad"
to the Rock of Israel
"to Israel's protective rock" or "which is like a protective rock for Israel"