You already have an accepted answer to your question, but still I would like to enlighten you with my limited knowledge with the aid of an article I came across few months back
Situating the Gentoo in History
This article would walk-through you, as to how, Vasco da Gama on reaching Calicut, were able to identify the two tribes, one who were non natives but wealthy, into profession like traders, sailors and traders, and the other were the native inhabitants, whom he thought practiced a peculiar form of Christianity and called them Gentios. Like Portuguese, the Early English adopted the name for the local inhabitants to be Gentios but little variations were adopted where it finally ended up to be Gentoo. Later, when the Englishmen realized that the local natives were actually following a separate religion not a form of Christianity, and divided the inhabitants into three categories. The Idolators, the Indian Nestorians and the Indian Christians. The Idolators were sub-dived furthers into sects, the primary being Bramhins. NB Halhred was the first European to assume, the religion of Bramhins was Hindu. In 1773, East India Company's President and the Council ordered to compile the Gentoo and Mohammedan Code of Law and in March 1774, NB Halhred was commissioned for the task which he completed in 1776. In that book he used the term Gentoo to depicts the class of people who knew the laws and used the term Hindu to express the religion of those people. The Book was titled, Gentoo Laws