This is not automatic but I got there, sort of.
library(ggplot2)
DF <- data.frame(X = c(rnorm(10000), rnorm(10000) + 10),
Y = c(rnorm(10000), rnorm(10000) + 10))
ggplot(DF, aes(X, Y)) + geom_point()

KDE <- MASS::kde2d(x = DF$X, y = DF$Y, n = 100)
DFnew <- data.frame(X = rep(KDE$x, 100), Y = rep(KDE$y, each = 100),
Z = as.vector(KDE$z))
ggplot(DFnew, aes(x = X, y = Y, z = Z)) + geom_contour_filled()

Created on 2020-05-27 by the reprex package (v0.3.0)