This statement does not appear in R. Chaim's own writings, though it seems to have been popular as an oral tradition. Its meaning is debated even by his closest students.
One written source for the comment is from Reb Chaim's son, R. Velvel, quoted in the linked article as well as in Haggadah L'Beis Brisk (pg 175). His interpretation is I believe the most straightforward one: someone who comes to beleive in heresy through no fault of his own loses his share in the World to Come. The way in which this is phrased by R. Elchonon Wasserman (Kovetz Maamarim pg. 19), another of Reb Chaim's greatest students, is that while in all other areas of Torah there's a concept of 'shogeg', someone being exempt form being punished by the full extent of the law due to being mistaken, this is not so regarding heresy. This is also how the statement is interpreted by R. Moshe Shmeul Shapiro, by R. Yichiel Michel Feinstein, R. Shimshon Dovid Pinkus (last few pages of Breichos B'Cheshbon, and in other random books and places.
However, aspects of this interpretation are still left unclear and subject to debate, and here we get into the question of how Reb Chaim knew this to be the case. If such a person is considered a 'heretic', does that mean that he cannot perform shechita or pour wine for me?
As for a source, R' Weinberg (quoted by YeZ) shows that the Rambam does state (towards the end of his introduction to Perek Cheilek) that anyone who doesn't know and believe in the 13 principles would be a heretic (meaning, even if he never heard of them, and obviously can't be faulted, he's still a heretic). His definition of heresy in Hilchos Teshuva likewise seem to unequivocally include both the mistaken and unintentional disbeliever. R' Velvel was quoted as using this as an answer to why the Rambam formulated 13 principles, seeing as denial of any area of Torah should make one a heretic. The answer is that mistaken disbelief only makes someone a heretic if the disbelief is one of the principles, not another teaching of the Torah.
However, in several places, the Rambam discusses those who believe in heresy due to their upbringing and through no fault of their own. (See his comments to Mishnah Chullin 1:2, Hilchos Mamrim 3:3, Hilchos Shechitah 4:14-16, Moreh Nevuchim 1:36, Shut HaRambam 449, and towards the end of Iggeres Hashemad). In most of these places, the Rambam does seem to believe in a concept of shogeg regarding heresy, as he writes that someone who merely believes in heresy due to a mistake can still be a good shokhet.
Somewho? have suggested that the Rambam would differentiate between different forms of heresy, as there are 'minim, kofrim, and apikorsim' (see Hilchos Teshuva ch. 3) and not all of them necessary have the same laws. However, I find this to be a difficult read in the Rambam, and I believe that the true explanation, as indicated by several of the sources quoted above, is that while the 'unfortunate heretic' is not a halakhic heretic for the purposes of wine and slaughter etc. he is still a metaphysical heretic.
What's a metaphysical heretic, you ask? Just about every instance where the Rambam mentions heresy or heretics, he also writes that a heretic (1) loses his share in Olam Haba, and (2) is no longer considered part of the Jewish people. Thus, someone who is a heretic through no fault of his own, but merely due to a mistake, would have lost his relationship with the Jewish people and/or a share in the World to Come. I believe that the sources quoted above indicate that such a person would indeed lose his share in Olam Haba (as does the Abarbanel interpreting the Rambam, in Rosh Amanah ch. 12), but R. Weinberg, as quoted here and in the book Even Shesia, has reportedly said that the mistaken heretic loses his relationship with the Creator, but might still be granted access to the afterlife.
R. Elchonon Wasserman (Kovetz Maamarim pg. 19) also quotes this statement, but interprets this statement very differently: there's no such thing as being a heretic 'by accident', since the truth of God is so obvious that only a wicked person would deny it. (I personally have a lot of trouble accepting this though, especially regarding the other 12 principles besides belief in God, though it is perhaps supported by Moreh Nevuchim 1:36).
See also here and here, my discussion of these ideas in other contexts.