If they are talking about the Laplace operator, this statement is true only in dimension 2. And this is only sufficient, not necessary.
In general, for solvability of the classical Dirichlet problem, the boundary has to be regular (in the sense of potential theory). A necessary and sufficient condition of regularity is given by the Wiener criterion
(see, for example Landkof, Introduction to modern potential theory, or any other book on potential theory). In dimension 2 the following is true: if a point is contained in a connected closed subset of the boundary, then it is regular. This is sufficient but not necessary.
For example, the standard Cantor set is regular at each of its points.
In dimension n, a smooth surface of codimension 2 consists of irregular points.