In ancient history, there were clans or tribes, who's members claimed descent from a common ancestor. This tribal name became the Gotra in Indian contest and is called a sur-name in rest of Eurasia. However, both gotra and jati in India originally are a variation of jat/goth only.
Jati means sub-jat i.e. you r jat it's ok but which Jat r u? whether Tomar, Dahiya, Dalal, .. etc. Here among Jats all jatis (clans) used 2 b equal like modern jat goths/gotras, where no one claims superiority over others unlike Rajputs. Every jat is proud of his jati i.e. clan but at the same time treats other clan of jats also with equal dignity. So proud of their clan jats are that they never changed their clan for thousands of years inspite of variations in languages, places, religions, their deadly friendly and deadly enemical alliances, their social, economic n political status etc. This word jati was later misused and mis-enterpreted by later pauranic people for their benefit as were vedas varna vyavastha were misused by them. There is Hyme in Rigveda "I'm poet, My father is physician, my mother grinds corn...etc"
Similar is with Goth n gotra is sanskritised form of Goth. It again means U r Goth/Got (means Jat) is o.k. but which Got r u? whether Bisla, Brar, Sandhu,..? this sub-got was called gotra. I've seen jats speaking many languages but all used the word got and not gotra for their clan name. These two names Jat and Got are found with little variations all over world in general and Eurasia in particular.
Many times in history a single tribe became so powerful that it gave its name to many land, areas, cities, towns, rivers, mountains, countries, oceans, seas and also to other tribes. When a particular tribe was in supremacy, all the population under its control, was called after the supreme tribe and such cohesion of people of different tribes, has been aptly called "Confedracy of Tribes". These tribal confedracy has given their names to various "castes" in India. For example when Gurj tribe was in power in 10th century AD in north India gave its name to cities like Gujrat/Gujranwala in Pakistan, areas like Gujrat state in India, and finally became a seperate caste- Gujar/Gujjar/Gurjar in India. Similar is the position of Tur/Turk, Mukhal/Mughal, Arya etc.