All you need to know is here really The basic conclusion is that yes genes do contribute to our intelligence.
I could imagine a situation where a particular group of people are under more pressure to survive than they are now, not so much in a physical sense, but in a sense where if you didnt have your whits about you then you wouldnt develop the means to bear as many offspring as those who do. In such a community, successive generations would get smarter. Thats one of the 2 basic principles of evolution.
Compare that to a society where it doesnt really matter how clever you are you still have on average the same number of offspring as everyone else who might be smarter or less smart than you. i.e. There is no correlation between IQ and number of offspring, then we might expect successive generations to stay about the same as far as intelligence goes.
The third scenario, which is actually what the human species as a whole is currently exhibiting, is a negative correlation between intelligence and number of offspring raised. This occurs both on an individual level, and also with communities. Perhaps intelligence isnt the right word to apply to communities, but if we can use statistics like patents issued, industrial growth, nobel prizes won, the ability of the community to sustain a comfortable life for its members in a sensible manner etc, then we can see how this negative correlation would lead to a situation where successive generations are in fact becoming less smart.
Is this us acting in spite of evolution? Perhaps we have gotten too smart, and that smartness is threatening the ability of the planet to sustain life and evolution is acting on another level, not trying to improve the fitness of our species but rather the fitness of life on earth itself, at the expense of one particular trait of our species?