Used liberally by the Romans, and then used even more liberally during World War I and II, it was perhaps inevitable that this security mechanism would be adopted from the earliest form of computing.
Passwords have been used as a method of security since ancient times, when sentries would challenge those wishing to enter a restricted area to verbalize a particular word or phrase.