If you're interested in a lengthy and rigorous explanation check this out. To summarize, it all comes down to integral approximations. To get the probability of a specific variable value from the variable's continuous probability density function (PDF), you integrate the PDF around the value in question over an interval of width epsilon, and take the limit of that integral as epsilon approaches 0. For small epsilon, this integral will be equivalent to the product of epsilon and the height of the PDF at the variable value in question. Ordinarily, the limit of this expression would be to 0 as epsilon approached 0. However, as Neil mentioned in his answer, in the case of Naive Bayes we are interested in the ratio of conditional probabilities. Because both the numerator and denominator of our ratio will include a factor of epsilon, these factors of epsilon cancel out. As a result, the limit of the ratio of conditional probabilities will be equivalent to the ratio of the PDF heights at the variable value in question.