Environmental and genetic factors play definitely a role in determining IQ scores. According to American Psychological Association is to expect genetic influences on IQ scores to become less important as one gains experiences with age.
Empirical evidence suggests that children behave differently to the same environment because of different genes; although there is a strong believe that children are pretty much influences by their peers and other experiences outside the family.
Over 17,000 genes have an impact on the development of the cognitive and brain development, but no finding of a strong gene effect on IQ has been replicated.
We are still looking for the specific genes which cause gifted children to seek out more stimulating environments, that at the end increase further on their IQ level.