There is sufficient evidence to indicate that one's intelligence is partly determined by heredity, partly by environment, and partly by the interaction between the two.
Recent study proposed a list of 52 candidate genes linked to human intelligence:
Sniekers S. et al. Genome-wide association meta-analysis of 78,308 individuals identifies new loci and genes influencing human intelligence. Nature Genetics (2017)DOI:doi:10.1038/ng.3869
It has been known for over a century that that there is a strong genetic component to intelligence. In fact, this is probably the most secure finding in the whole of psychology. See Wikipedia for good summaries of this.