Originally titled "The Defence of Fort McHenry" by its author, Francis Scott Key, his poem was eventually placed to music (to the tune of a song already known in America, "The Anacreontic Song," aka "To Anacreon in Heaven") and was adopted as the young country's national anthem. Key used the word "o'er" as the first word of the repeating last line of each of the four stanzas (as well as in the middle of the first stanza as well). In this case, the word is a shortened version of the word "over." Key probably chose "o'er" because of its single syllable, rather than "ov-er," whose two syllables did not fit as well.
o'er is a older poetic version of over.