"But as for you, Bethlehem Ephrathah, Too little to be among the clans of Judah, From you One will go forth for Me to be ruler in Israel. His goings forth are from long ago, From the days of eternity."
(Mic 5:2 NASB)
Regarding this verse the NET Bible comments:
Heb “from the past, from the days of antiquity.” Elsewhere both phrases refer to the early periods in the history of the world or of the nation of Israel. For מִקֶּדֶם (miqqedem, “from the past”) see Neh_12:46; Psa_74:12; Psa_77:11; Isa_45:21; Isa_46:10. For מִימֵי עוֹלָם (mime ʿolam, “from the days of antiquity”) see Isa_63:9, Isa_63:11; Amo_9:11; Mic_7:14; Mal_3:4. In Neh_12:46 and Amo_9:11 the Davidic era is in view.
In riddle-like fashion this verse alludes to David, as the references to Bethlehem and to his ancient origins/activities indicate. The passage anticipates the second coming of the great king to usher in a new era of national glory for Israel. Other prophets are more direct and name this coming ideal ruler “David” (Jer_30:9; Eze_34:23-24; Eze_37:24-25; Hos_3:5). Of course, this prophecy of “David’s” second coming is actually fulfilled through his descendant, the Messiah, who will rule in the spirit and power of his famous ancestor and bring to realization the Davidic royal ideal in an even greater way than the historical David (see Isa_11:1, Isa_11:10; Jer_33:15).