World War I was a global conflict on planet Earth in the early 20th century, begun when Austria-Hungary attacked Serbia in response to an assassination. The conflict quickly spiraled out to encompass Europe with the Entente Powers and their allies, including France, Russia, the United Kingdom, Italy and the United States of America declaring war on the Central Powers including Germany, Austria-Hungary and the Ottoman Empire.
The conflict began in 1914 and finally ended in 1918 with the defeat of Germany and her allies. Following the end of the war, the Germans were shamed by their defeat, and this was one of the contributing factors for a second global conflict in 1939. (TOS - My Brother's Keeper novel: Republic)
In 2155, Captain Erika Hernandez compared the network of mutual defense agreements between Draylax, Alpha Centauri, United Earth and the Coalition of Planets, to the situation that had led to World War I. (ENT novel: Kobayashi Maru)
In the 23rd century the being Trelane became fascinated with World War I, and attacked the USS Enterprise in a space vessel which resembled a biplane from that time period. After this initial encounter, Trelane subjected the Enterprise crew to a simulation of a German World War I era town. (TOS video game: Judgment Rites)