mid-15c., "talk idly, babble," short for chatter (v.). Meaning "to converse familiarly" is from 1550s. Sense of "flirt with, ingratiate oneself with" (in later use often with up (adv.)) is from 1898. Related: Chatted; chatting.
1520s, "chatter, frivolous talk;" see chat (v.). Meaning "familiar conversation" is from 1570s. Chat show, for what in U.S. is a talk show, attested from 1969. Chat room in the online sense is attested by 1994, from the days when AOL ruled the Web.