nonono you will get experience and money anyway if you manage to beat him, i didnt beat him myself but i actually know for sure that you gain your xp and money (gym leader are poor :p)
EDIT : actually you are right you dont win exp and money after losing to gym leader, ok my bad i was sure of the contraries but whatever, sorry ^^