WWI had been going on for a number of years before the US decided it was time to get into the fight and on April 20, 1918, the soldiers of Imperial Germany had their first meeting with the US Marine Corps.
On that date, The Germans attacked a Marine detachment and made several attempts to dislodge the Americans from the position. The failed as the Marines put up an incredible fight, well beyond what the Germans expected from the American forces.
In an article printed on April 27th in the LaCrosse Tribune, it was reported that the German soldiers called the Marines “Teufel Hunden” or “Hounds from Hell.” (Grammatically it should probably have been Teufelshunde). This quickly was turned into Devil Dog and has been a term of endearment for Marines ever since.
(Possibly. There are a number of versions and timelines that make an exact date hard to determine.)