This vision is analogous to chapter 2, covering the same 4 empires: Babylon (winged lion), Persians (bear), Greece (leopard), Rome (iron & 10 horns). Daniel is constantly reminded not to worry, for the saints will receive and possess the eternal kingdom, from the Ancient of Days, no matter what kingdoms come and go. The application of this is not lost on me, as I watch the presidential elections come in tonight.
The ram and goat signify Persia and Greece in more detail. Greece will come against God's people very successfully at the "appointed time of the end."
Daniel's understanding of Israel's determined length of exile in Jeremiah prompts him to confess Israel's sins and seek restoration. Gabriel is sent to confirm and clarify the vision. Messiah will be cut off, make a covenant with many, and put an end to sacrifice. Desolations and abominations will follow.