A lot of people put weight on as they get older without changing their diet. One reason for this is that our basal metabolic rate slows down as we reach the age of 30. Following 30 it is recommended we eat 50 calories a day less for every 5 years past the age of 30. One of the reasons for the metabolic slow down which induces weight gain as we get older is that we lose muscle as we age and muscle is metabolically more active than other body tissue.
One way to prevent weight gain as you get older is to ensure that you increase the amount of exercise you do so that you are as active as in your youth. Also, introduce some muscle toning exercises to help maintain muscle mass.