The scientific consensus is our best model for reality. That isn't about having faith in any group, it's about having faith in the scientific process. Your example of stomach ulcers only supports that point. Once new evidence was found, the new explanation was quickly adopted into the scientific consensus (so it remained the best model for reality).
The problem with a direct comparison in this case, that we ought to accept the consensus and be as dismissive about anthropogenic climate change skeptics as we are about someone who still claims that the Sun revolves around the Earth, is that in the case of stomach ulcers, the result is easily testable and reproducible. Much harder for something as complex as the climate. Additionally, this issue is laden with political consequences on both sides so it's hard to accept objectivity on either side (very difficult for someone to obtain a grant inside the academic mainstream to study something that is contrary to accepted opinion, and very difficult for someone to obtain a grant from industry to study something that is in line with accepted opinion. not to mention the potential effects for fossil fuel and alternative energy companies)
The consensus just means that the different scientists can independently reproduce the similar results. You can do the calculations yourself too.
But that's not how the 'consensus' is being used in argument. The way that advocates use it as a bludgeon: that because 99% of all climate scientists agree with anthropocentric climate change that any argument to the contrary is ludicrous and ought to be dismissed outright. Now, I don't think (I guess I hope) that the actual scientists think in those terms. But that's how their advocates (Al Gore and the like) frame the issue. And that both hurts their cause and provides fuel for the opposition. I'd bet that if Al Gore had never entered the cultural debate over climate change it would be much, much healthier.
Prior to the 80's the 'consensus' was that stomach ulcers are caused by stress and spicy foods. Two lone Australian medical researchers thought a bacterium was the causal agent, and so one of them actually swallowed a petri dish to prove his point.
http://en.wikipedia.org/wiki/Barry_Marshall