I was watching Wonder Woman and noticed that it had been shifted from her typical origin story of being found by a WW2 fighter pilot to being found by a WW1 spy. Chris Pine called WW1 the war to end all wars.
Through our lens, in which WW1 certainly did not end all wars (And probably sparked a few), it seems silly to name any war that doesn't end in human annihilation the war to end all wars. Someone's gonna get pissy about something, and bam, we have a war.
That said, Industrial war was a new concept back then, and the turn of the 20th century was fairly optimistic in general (See: Worlds fair). Did people actually believe that the outcome of WW1 would actually be the end of war?
Your question is too broad to fully answer, but the ideas behind the phrase have indirectly led to the UN. The optimism about preventing conflicts through cooperation is alive and well.
Optimism about said cooperation ending all wars almost certainly died with the abject failure of the League of Nations - and never was extremely widespread to begin with.
H.G. Wells coined the phrase. His vision was that after the terrible destruction of industrial war, all people would come together in a League of Nations to make a lasting peace.
These ideas gained some popularity during WWI, and afterwards the League of Nations was formed. Woodrow Wilson (oft associated with the quote) was a driving factor behind this.
The failure of Wells' ideas (and origin of the ridicule of the phrase) is best demonstrated in how the League of Nations was completely powerless to prevent WWII.
More in depth reading: http://www.vision.org/visionmedia/history-world-war-I-world-wars/81869.aspx