Most studies which look at this question simply look at parents and children and calculate the correlation between the two factors. It’s well established that obese parents are more likely to have obese children , although that doesn’t tell us too much. And it’s not the strongest correlation in the world according to that study (R^2 ~= 0.3). There is some evidence that obesity spreads over social networks as well , although this type of evidence needs to be taken with a large spoonful of salt . The short version is that It’s hard to tell with a friend getting fat makes you get fat, or whether people choose friends who are like them.
When looking at heritability, there’s always a question about whether environmental or genetic factors are at play. The traditional way of resolving this is with twin studies. Stunkard et. al  did just that, and found a much higher correlation between monozygotic (identical) twins than dizygotic (fraternal) twins. Even stronger evidence of biological factors is that adopted children show a correlation between their BMI and their biological parents, but not their adoptive parents . Both of those studies are pretty old, it may be that the causes of obesity are different now, but I wouldn’t expect the measurement methods to have changed too much (measuring BMI isn’t rocket science).
So lets dive into some of those genetic factors. The most well known comes from mutations in the FTO gene . The mechanism seems to be (sit down if you’re standing) causing people to eat more . Carriers of variations of this gene consume up to 280 kcal per day than non-variants. Which isn’t a lot, but over time adds up to 2-3 kg of extra body weight . MC4R  has some similar effects, and MC4R deficiency leads to hyperphagia (higher feelings of hunger) and obesity in general in humans. My favorite quote from that review:
Interestingly, MC4R-deficient mice are not hyperphagic when fed a low-fat diet, whereas hyperphagia is observed after the introduction of diets that have increased fat content, indicating gene–environment interactions
While this just was mice, it was not lost on the authors that this could be one contributor to increased obesity in humans. MC4R mutation seems to only explain a 1-5% of human obesity, though.
There are other genetic variations which contribute to obesity, and most seem to regulate food intake (rather than energy expenditure). The whole fast/slow metabolism thing is largely a myth; resting metabolic rate varies between 5-8% between individuals . People do have varying activity levels, lean people tend to perform more non-exercise activityand burn more energy that way , but food intake is certainly a huge factor as well. The genetic factors that we currently know of seem to work at that end.
Child to adult body mass index in the 1958 British birth cohort: associations with parental obesity
Arch Dis Child 1997;77:376-380 doi:10.1136/adc.77.5.376
The Spread of Obesity in a Large Social Network over 32 Years
N Engl J Med 2007; 357:370-379
The Spread of Evidence-Poor Medicine via Flawed Social-Network Analysis
- Stunkard AJ, Foch TT, Hrubec Z. A Twin Study of Human Obesity. JAMA. 1986;256(1):51-54 http://jama.jamanetwork.com/article.aspx?articleid=359582↩
- An Adoption Study of Human Obesity
Albert J. Stunkard, M.D., Thorkild I.A. Sørensen, Dr.med., Craig Hanis, Ph.D., Thomas W. Teasdale, M.A., Ranajit Chakraborty, Ph.D., William J. Schull, Ph.D., and Fini Schulsinger, DR.MED.
N Engl J Med 1986; 314:193-198. http://www.nejm.org/doi/full/10.1056/NEJM198601233140401
Genomics, Type 2 Diabetes, and Obesity
Mark I. McCarthy, M.D.
N Engl J Med 2010; 363:2339-2350
- Speakman JR, Rance KA, Johnstone AM (August 2008). “Polymorphisms of the FTO gene are associated with variation in energy intake, but not energy expenditure”. Obesity (Silver Spring) 16 (8): 1961–5. doi:10.1038/oby.2008.318. PMID 18551109.↩
-  The genetics of human obesity
Christopher G. Bell, Andrew J. Walley & Philippe Froguel
Nature Reviews Genetics 6, 221-234 (March 2005) | doi:10.1038/nrg1556
- Variability in energy expenditure and its components.
Curr Opin Clin Nutr Metab Care. 2004 Nov;7(6):599-605
Interindividual Variation in Posture Allocation: Possible Role in Human Obesity
Science 28 January 2005:
Vol. 307 no. 5709 pp. 584-586
DOI: 10.1126/science.1106561 http://www.sciencemag.org/content/307/5709/584.short↩