Passports were required in ancient, medieval, and early modern ages, either for immigration or for emigration or both. However, what was called passport back then might be better characterized as entry and exit visa. As time went on and travel became more common, those mutated into multi-use identity documents.
There was a brief period before 1914 when passport requirements lapsed. Immigration control was done by other means, some emigration controls weakened.
Read up to the history of Ellis Island for a well-documented example what immigration controls looked like.