It seems plausible that density might be a factor, even if only as a result of probabilities. It could increase the likelihood of the brain entering a state that "yields" intelligence but i would be surprised if it played a direct role in what we identify as intelligence.
For example, when Einstein formulated his theory of relativity, computationally speaking, he solved an instance of a problem of the form "given X data, identify the process that produced X or a significant portion of X" (where "significant" varies with the context).
There are different interpretations of "intelligence", but we tend to associate the ability to successfully formulate a hypothesis that describes a given process/state, with intelligence.
Given some data, we can arrive at a suitable hypothesis by trying out all the possible explanations and picking the one that works the best. Of course this isn't realistic for either computers or brains because of the volume of possibilities that would have to be explored.
In computer science these types of problems are commonly occurring yet intractable problems called NP-Complete problems. One example is Subset-Sum: given n numbers determine if there exists a subset of the n numbers that adds up to zero.
Luck is a factor in solving these problems. You may randomly pick the only subset, of 1000 numbers, out of a million, that adds up to zero right on the first attempt. That's like solving the Riemann Hypothesis by saying the first thing that you think of.
The fact that NP-Complete problems are not efficiently solvable (pending proof of P != NP) means that no one, not even a super quantum computer, has an algorithm that enables them to effortlessly arrive at a Theory of Relativity or a Theory of Everything or a solution to the Riemann Hypothesis.
In effect, hard work and occasionally a little luck are the biggest contributors to intelligence, more so than innate ability, as long as you're able to tune your attempts and avoid repeating mistakes. Without hard work you're only intelligent if you're really lucky (and the former is much more admirable).