Consuming excess calories from any macronutrient, including carbohydrates, can contribute to weight gain. However, carbohydrates themselves do not cause weight gain. It is important to maintain a balanced diet and consider overall calorie intake and physical activity levels.