The trench coat is named after a hole in the ground, and trench itself once meant a cut.
Trench came into English in the late 15th century for a long, narrow excavation. It comes from Old French trenche, "a slice, a cut," from the verb trenchier, "to cut." That verb may go back to Latin truncare, "to cut off," though Etymonline calls the origin uncertain. The same verb gave English trenchant, sharp or cutting, and trencher, a wooden platter for carving meat.
The coat needed a war. Trench warfare is attested in British newspapers by October 1914. Officers' traditional greatcoats were long and heavy and became caked in mud. They needed something shorter and lighter that still kept out the weather.
Two British firms say they supplied it. Aquascutum traces its waterproofing to a fabric John Emary patented in 1853. Smithsonian magazine says the firm was outfitting British officers as early as the Crimean War. Thomas Burberry, who founded his business in 1856, is credited with inventing gabardine, a breathable weatherproof twill, in 1879. In 1912 his company patented the Tielocken, a belted, knee-length weatherproof coat. Smithsonian concludes that Burberry may have the stronger claim, but no one really knows.
The details were practical. Epaulettes showed rank, and a belt with D-rings held kit such as binoculars, maps or a pistol. A cape across the back shed rain, and the collar buttoned at the neck against rain, helping gas masks fit snugly. Officers bought the coats themselves, at about three or four pounds, when an ordinary soldier earned a shilling a day.
The name followed the garment quickly. Etymonline dates trench coat to 1915, the same year as trench foot, and notes the coats were advertised by January 1915. Smithsonian puts the first printed use in a 1916 tailoring trade journal. Either way, the word was coined during the war.
Former officers kept their coats after 1918, and Hollywood did the rest. Humphrey Bogart wore an Aquascutum trench coat in The Maltese Falcon, and trench coats again in Casablanca and The Big Sleep.