There are two popular etymologies for this term for a person who gives a gift only to later demand its return. The first is that it is based on an unfair stereotype of Native Americans, that they don't keep their word. In the other popular explanation, the term doesn't cast aspersions on Native Americans, instead it echoes the broken promises the whites made to the Indians. Neither is accurate, although the first is closer to the truth.
Instead the term comes from different commercial practices. To the Native Americans, who had no concept of money or currency, gifts were a form of trade goods, of exchange. One didn't give a gift without expecting one of equivalent value in return. If one could not offer an equivalent return gift, the original gift would be refused or returned. To the Europeans, who with their monetary-based trade practices, this seemed low and insulting, gifts were not for trade but were to be freely given.
The noun Indian gift dates to 1765. Indian giver follows about a century later in 1865. Originally, these reflected simply the expectation of a return gift. By the 1890s, the sense had shifted to mean one who demands a gift back.