Difficult question ! They are very similar and all three are words for companies.
I would say that maybe the main difference is they all have other meaning
Une entreprise can mean something you want to achieve, an operation, a project, so by extension a company you incorporate to produce goods (
http://fr.wiktionary.org/wiki/entreprise). Le monde de l'entreprise is the world of business
Une société is people that meet together in a certain goal, or it's society in general (
http://fr.wiktionary.org/wiki/société). The legal term is often société (société anonyme for example is a kind of companies)
Une compagnie is the fact of people being together, but it can be a company, thought it's an older world but still used for insurance companies (don't ask why, I don't know).
http://fr.wiktionary.org/wiki/compagnie
But maybe someone will have a better answer, because now I'm wondering too why we use 3 words for similar things ;-)