Psalms 24:7

שְׂאוּ שְׁעָרִים רָאשֵׁיכֶם וְהִנָּשְׂאוּ פִּתְחֵי עוֹלָם וְיָבוֹא מֶלֶךְ הַכָּבוֹד

Lift up your heads, you gates, and be lifted up, you everlasting doors; so that the King of glory may enter.

Psalm 24 is recited in its entirety when returning the Torah to the ark (except on Shabbos mornings). The Talmud (Shabbos 30a) Midrashically relates this verse and the next to a story involving King Solomon. At the inauguration of the Temple, the gates refused to open. Solomon cried out with this verse: open up so that King of glory may enter! The gates, thinking that Solomon meant himself, replied, “Who is this King of glory?” Solomon replied “Hashem, strong and mighty…!” (The gates’ rebuke and Solomon’s answer form the text of the next verse.)