Ganar as a verb does mean "win" or "earn" as you've been told, but as a noun (la gana or, more frequently in Spain, las ganas) means something very similar to desire.
"Tengo ganas de comer" (tener + ganas+ de) is not very strong, i'ts like "I want to..."
but
"Deseo verte esta tarde" - "I look forward to seeing you this evening". It is a bit stronger, like expressing a strong desire.
If you just want to tell people you want this or that, use "quiero" or "tengo ganas de". "Deseo" is usually used for wishes or in a formal context.
Hope that helped!