These are different things. There is a lot written about these differences here on the forum. It won't be difficult for you to find descriptions of the differences. There are differences both from the player's point of view and from the bookmaker's or casino's side in relation to their respective business.
Some thoughts here. I think some times we can also look at it as a larger or general view and if we look at it that way then we could just say one is a general name while the other just classifies a sperate aspect of gambling. Like I think betting is for a separate kind of gambling as to do sports betting, poker, slot and other games etc. So the act could be called gambling because it involves exchange of money or material for gain or loss. Therefore, I think the act is where the word gambling is coming from while the action could be called betting.