Long gamma is being long realized volatility. Long vega is being long implied volatility. Long gamma positions benefit when realized volatility goes up or the actual underlying has volatility. Long vega positions benefit when the price of volatility goes up.
Being long plain vanilla options, one is long both gamma and long vega. However, this is not so if one starts to combine options in strategies. One can construct positions where one is long gamma and short vega.
A simple example would be a simple calendar spread--if one is long an at-the-money call with short maturity, one is long gamma and long vega. If one shorts an at-the-money longer dated maturity call on the same underlying, one is short gamma and short vega. However, the short longer dated call will be less long gamma than the shorter dated one; and short more vega than the shorter dated one. The combined position will be long gamma and short vega. The position will benefit if realized volatility goes up before the shorter dated call expires, and if implied volatility goes down.