Archaic directional noun; in modern Japanese, あちら or あっち are used instead.
In classical texts, あなたがた can refer to a direction.
Archaic third-person pronoun; now replaced by あの人, 彼, 彼女, etc.
In old writing, あなたがた is used to mean 'that person'.
Standard modern third-person pronoun; replaces the archaic あなたがた for 'that person'.
The historical derivation is uncertain; the kanji 彼方方 literally suggest 'that direction/person', but the word is now obsolete.