First of all we need to take into consideration that our specie is more adaptive and versatile in its communication and therefore we have more optional meanings to our gestures. In the animal kingdom we have somewhat "simpler" and instinctive meaning for a smile:
Researchers looked at chimpanzees and noted that a weak chimp will "smile" at another more threatening chimp to show his vulnerability and non hostile temper. You can say it's sort of boot-licking behavior to help him survive - that and apparently it often works. Yeah, he smiles to appease, to show his fear and ask for mercy.
But when it comes to us, it's a lot more complicated. After all, we rarely smile out of fear, but our smile shares a quality with the grimace - we smile to others to form some kind of bond with them, and we do so by showing them that we're not a threat. It's sort of a small appeasement offer, that mustn't originate in fear but rather can be in the context of: "I feel good around you" "I trust you" "I like you".
Note: think of a person who rarely smiles, he/she probably won't be a very likable and popular figure, but he/she will also possess a certain strength of character - simply because he/she refuses to appease anyone.