According to wikipedia,
Kowtow ... is the act of deep respect shown by prostration, that is, kneeling and bowing so low as to have one's head touching the ground.
With reference to its origins, reading before to mean in front of, not predating:
In Imperial Chinese protocol, the kowtow was performed before the Emperor of China.
The wikipedia article also offers some notes on modern usage, including in induction ceremonies and in other contexts, such as:
In extreme cases, the kowtow can be used to express profound gratitude, apology, or to beg for forgiveness.
Negative references include the May Fourth Movement:
an anti-imperialist, cultural, and political movement growing out of student demonstrations in Beijing on May 4, 1919, protesting against the Chinese government's weak response to the Treaty of Versailles, especially allowing Japan to receive territories in Shandong which had been surrendered by Germany after the Siege of Tsingtao.
Modern colloquial usage sees the word in a more derogatory light:
1 Act in an excessively subservient manner
Kowtow Intransitive verb
2. To show servile deference.
- The Free Dictionary
The Free Dictionary offers several synonyms, of which the following are among the less unprintable in polite society:
grovel, court, flatter, lick someone's boots
You ask in relation to the origins of the word:
Does “kowtow” have racist connotations?
The simplistic answer is no.
The origins are rooted in imperial China (or before), performed by Chinese to Chinese, so it does not originate from racist roots. However, to kowtow to someone, whether physically and metaphorically, speaks of a vast difference in status. Although modern usage is split between honour codes and derogatory references, it is often (possibly always) derogatory when not offered voluntarily.
In particular, in the absence of an honour code as context, saying that someone kowtows to someone else doesn't normally carry the literal sense of prostration. At best, it carries the connotation of grovelling.
In light of all this, the fuller answer is that because the term is recognisably ethnic, using kowtow instead of (say) grovel does carry some racist overtones, particularly when applied to someone interacting with a person of a different ethnicity.