Humans beings differ by only 15 million base pairs/5 million Amino Acids, a very small amount. Less than 0.5% of the human body. Saying this, intelligence can vary a maximum of 50% between any two individuals due to environmental and behavioral factors.
So the environment does play a huge part in determining how smart one is. If you look at it from a Sociological approach, you can say that socioeconomic differences is what plays a major role here.
A child born with rich parents who both went to college will have a much higher chance of being successful and "intelligent" as compared to someone born into a poor neighborhood which lacks resources.
There were many studies done on Twins to test this. You can google these research articles and read them if you like