From about.com .... Although the exact origins of five-spice powder are lost to history, there is some thought that the Chinese were attempting to produce a "wonder powder" encompassing all of the five elements. All of the five flavors - sour, bitter, sweet, pungent, and salty - are found in five-spice powder. Then again, it's possible that a cook accidentally stumbled upon this particular combination of spices, and realized its power to enliven the blandest dish. Whatever the case, there is no doubt that five-spice powder is unique.
Of course, these days the specific combination of spices used to make up five-spice powder varies. In fact, some brands could more accurately be labeled "seven-spice powder," since they contain seven ingredients. The traditional mixture includes fennel, cloves, and cinnamon, along with star anise and Szechuan peppercorns. However, you'll also find five-spice powder made with cassia (a member of the same family as cinnamon), ginger, nutmeg, and even licorice (star anise has a wonderful licorice flavor).