You can use Unicode combining character U+0305 COMBINING OVERLINE. It can be found by searching in the palette from Edit → Emoji & Symbols (formerly Edit → Special Characters…), or by using a specialized keyboard layout such as the built-in Unicode Hex Input or my own custom one mostly designed for mathematics.
Here's some sample text with overlines, but note that the quality of the results may vary widely with the font, application, and operating system in use by the viewer.
A̅ B̅ C̅ D̅ a̅ b̅ c̅ d̅ α̅ β̅ γ̅ δ̅ ε̅
Also, since the position of the overline depends on the height of the character, it will not necessarily align over multiple adjacent characters.
When using Unicode combining characters directly, you must type or paste them after the base character (and once you do so, they will be treated as one unit for editing purposes). This is the opposite of classic “dead key” combinations like Option-e a á where you specify the accent first.