ganar vs ganarse
Ganar is to win or earn. Ganarse is to earn something through your own effort — the reflexive stresses that you've deserved it.
ganar
To win a contest, earn money or gain something.
Ganamos el partido.
We won the match.
Winning contests. Also 'ganar un premio'.
Gano mil euros al mes.
I earn a thousand euros a month.
Salary. Not 'cobrar' for the amount, though cobrar is used for being paid.
Ha ganado peso.
He's put on weight.
Ganar peso = gain weight. Also 'ganar tiempo' = to save time.
ganarse
To earn through effort or deserve — often used with reputation, trust or living.
Se ganó la confianza del equipo.
He earned the team's trust.
Intangible things you win over time.
Se gana la vida como fotógrafa.
She earns a living as a photographer.
Ganarse la vida = to make a living. Fixed phrase.
¡Te lo has ganado!
You've earned it!
Deserving something. Also used ironically: 'te lo ganaste a pulso'.
Tricky bit
'Ganar la vida' sounds like you're winning life. Always 'ganarse la vida'. And 'me ganó' = he beat me; 'me gané' = I earned for myself.