Around the 13000 years. The previous significant inhabitants left or were wiped out due to the ice age. The idea of a country was established in 800AD.
The concept of visas may not have existed at that point in time, but you were at the mercy of those in power. If they didn't like you, they'd banish you from their lands or worse.
The modern rules are entirely based on statistics. How many overstay their visa. How many get denied a visa. Are compromised passports swiftly dealt with. India doesn't live up to the rules for easy visas.