Good ol' protein :D Here's a little background on it: When you consume protein, it gets broken down into amino acids. Amino acids are the building blocks of protein - a protein chain is just a bunch of amino acids linked together. These amino acids are used for a variety of reasons within the body - growth and repair of cells, hormones etc.
As with carbohydrates and fat, too much protein will cause fat gain. These amino acids will be converted into fat tissue (also known as adipose tissue).
Our body will naturally want to store any excess calories that go into our system just in case it needs them in the future. One way that the human body stores energy is by having fat stores. This is a survival mechanism - why discard something that may prove useful at a later date? Our bodies have an unlimited capacity to store fat.
In the course that I'm currently publishing, in LESSON 102 - The Calorie and Macronutrients I state that each gram of protein contains about 4 calories. So if the body does not require this excess protein, most of this excess energy will be stored as fat tissue. Same deal with carbohydrates and fat intake - your body will only require a finite amount of each.
The primary source of protein in the human body is from muscle tissue. If we are deficient in protein in our diet, muscle tissue will be broken down in order to supply (at least some of) the amino acids that are required.
Main thing to remember - too much protein, carbohydrate or fat in your diet and expect fat gain.