The word 'cat' itself has been used as a term of abuse for people since the 13th century. Shakespeare certainly used it thus later. The phrase 'copy cat' first appeared in written English in the 1890s, in a story in which the writer said that it had been a favourite term of his grandmother's. Obviously, then, it must have been from an even earlier date in everyday speech. Basically, it is saying someone is despicable because of aping someone else's work.