This is true, though a scientific theory isn't just a guess (pissed me off when people seem to equate it), so anyone that falls on the scapegoat of something being "just a theory" when discussing scientific theories doesn't know what they're talking about. Theories are predictive means that have ample evidence supporting them to make those predictions much more than random guesses, or even hypotheses. Why exactly two masses "gravitate" between each other isn't known, and there's plenty of examples of things that seem to disagree with our current predictive models. Though that doesn't really apply to the certainty with which we see and feel gravity's effect on us.
Though you bring an interesting point because people always fall onto the crutch of "correlation does not equal causation" to dismiss stuff, which is a bit of a copout a lot of the time. Having said that, my own ignorance (and arrogance) hasn't led me to believe theories of climate change are as solid as the theory of gravity. The unfortunate thing about your smoking example is that there are examples contrary to many people that have people smoke a lot, that do not get lung cancer. Though I'll definitely agree with the notion that smoking greatly increases the likelihood of getting lung cancer sufficiently to lend the idea of there being a causative effect, when controlling for certain things. In this regard, the theories behind it just aren't refined enough. Gravity is the same way, but nobody cares about the fact that various orbits and whatnot aren't accurately predicted by various models.
Though that's my mindless preamble since I'm not disagreeing with what you say