In general, the displacement (or any smooth vector field) can be separated into a part that has a divergence but no curl and a part that has curl and no divergence (known as Helmholtz's theoremHelmholtz decomposition). i.e. $$ \vec{D} = \vec{D}_1 + \vec{D}_2 $$ where $$\nabla \times \vec{D}_1 = 0, \ \ \ \nabla \cdot \vec{D}_2 = 0 $$ and thus $$\nabla \cdot \vec{D}=\nabla \cdot \vec{D}_1, \ \ \ \nabla \times \vec{D} = \nabla \times \vec{D}_2\ .$$
Gauss's law, where the closed surface integral of the displacement equals the volume integral of its divergence, can only tell you about $\vec{D_1}$, since $\vec{D}_2$ contributes nothing to the divergence of $\vec{D}$. But for $\vec{D}_1$ to represent all of $\vec{D}$ implies that $\vec{D}_2=0$ and hence $\nabla \times \vec{D} = 0$.
To put it another way, if the curl of $\vec{D}$ is non-zero, which would be the case if $\nabla \times \vec{P}\neq 0$, then it implies that $\vec{D}_2 \neq 0$ and so Gauss's law, which only tells you about $\vec{D}_1$ cannot give you the total D-field.