This is used in spoken Japanese to correct yourself.
I don't know what kanji (if any) apply to this or what the grammatical basis is for this usage. Please add details if you know them.
The listing for 元い (もとい) in my electronic dictionary is a link to 元へ (もとへ), so 元い is probably a corrupted/alternate form of 元へ, which literally means "back to the beginning". It's probably best to think of this phrase as meaning "take back", as in "Wednesday... no, I take it back -- Thursday".