In a "cliff note" response, the answer is yes. The concept is basically how much energy intake is exceedinding your expenditure (eat more than needed). It also depends on how much fat is in the calories you ate. Carbs are burned first, then protein and then fat. That's why it's important on how much fat is in the calories. It roughly takes 500 calories a day extra to gain 1lb of weight a week. Your excess calories are either burned off (used), excreted or stored as fat.
A more mathmatical analysis:
It takes about 12 calories per pound per day to stay alive (over a period of time). If you weigh 200 pounds, you need about 200 * 12 --> 2,400 calories per day to keep yourself alive and maintain that same weight. However, you will reach a point of equilibrium because as you gain weight, you need more calories to maintain that weight.