It's absolutely true that science is not about consensus. Science is not a body of knowledge, but a process of (roughly speaking) formulating an explanation of phenomena, devising a means to test the explanation, and then using that test to determine whether the explanation adheres to the "real world". One of the criteria of a good test is that it must be reproducible, but nothing in the process of science actually requires "consensus".
However, you have a bunch of different scientists with different specialties studying different phenomena, so much so that no single person can actually be aware of it all. Certainly no single person can actually reproduce all of the tests and experiments. In the face of such complexity, we've developed another system which, speaking strictly, is not "science". It's more of a social/political system whereby the various experiments are reviewed by other scientists who attempt to determine whether the tests were good, and whether the tests actually tested the explanation/phenomena they were supposed to. In a formal setting, this process is called "peer review", but it also happens informally (i.e. scientists read each others' work, challenge it, devise other tests).
The upshot of this social system is that, if you aren't enough of a climate scientist to review the existing knowledge of global warming and evaluate its validity, then you should probably just trust the consensus. You trust that there are a lot of smart people working on the problem, and if 95% of the climate scientists agree, then the safe guess is that they're probably at least on the right track. It doesn't mean that they're absolutely correct-- no scientific or social process can guarantee absolute correctness-- but you're going to find more success going with the overwhelming consensus than going against it.
Of course, every once in a while, there is some genius who figures out that the overwhelming consensus is wrong. Most of the time, the scientific community catches on pretty quickly and the consensus changes.