Although the actual term "Volksgemeinschaft" was not coined until WWI, it had a great deal of influence on earlier German history as well.
Beginning soon after the revolutions of 1848, Germans looked to try to create a single German nation out of all the smaller states that existed in the area. This came partly out of a new idea of nationalism or of a national community. This idea led to the eventual unification of Germany in 1871.
The idea of the national community became important again in WWI. It was used then as a way to promote unity and support for the war. It was meant as a way to deemphasize splits along class, religious, and ideological lines. It aimed to make Germans all feel united behind the war effort.
This idea, of course, was taken to extremes by Hitler and the Nazis in the lead-up to WWII. They pushed the idea of national community in a totalitarian and fascist direction. They tried to make everyone think and feel the same so that Germans could truly become "ein Volk." This helped cause WWII and the horrors of the Holocaust.