1907, type of cooking vessel, from French cocotte "saucepan" (19c.), a diminutive from cocasse, which is said to be ultimately from Latin cucama.
The meaning "prostitute" (1867) is a different word, from French cocotte, originally a child's name for "little hen" (18c.), hence "sweetie, darling." Compare coquet.