The terms ‘language’ and ‘dialect’ (and, indeed, ‘variety’ – a very handy term that encompasses ‘language’, ‘dialect’, ‘register’, and so on) are nothing more than terms of convenience and a reflection of culture. They are not scientific terminology. The reason for this is that it’s impossible to determine by objective linguistic criteria whether we’re dealing with one or two varieties – and that goes on all levels (even the individual). An excellent in-depth discussion of why this is so can be found in “Sociolinguistics” by R. A. Hudson.
‘Dialect’ has roughly two descriptive (as opposed to prescriptive) meanings:
1. “Variety of a certain language.”
2. “Non-standardized/non-official variety.”
(For the second meaning, a ‘language’ is then “standardized/official variety” – but a better term is simply “standard language”.)
The first meaning tends to be preferred by language enthusiasts, but it’s a lousy definition, since it’s impossible to determine what a ‘language’ is, and thus also what a ‘dialect’ is. The second tends to be hated by egalitarian-minded people because ‘language’ comes with a certain prestige that ‘dialect’ doesn’t have, but at least it makes it possible to distinguish the terms without ambiguity.
Whenever this question comes up, someone with the first definition in mind mentions mutual intelligibility as a definitive measure that can help us decide. However, mutual intelligibility is not only highly gradual; it also depends heavily on one’s previous exposure and will to understand, and so doesn’t help.