As A.S.K. notes in the comments, there's no straightforward way of doing it from ggplot itself.
Fortunately, rewriting the linear regression is super simple. By way of example, I use the mtcars
dataset with info about, well, cars, which is pre-loaded onto R.
Supposing your code looks something like this:
require(ggplot2)
#> Loading required package: ggplot2
ggplot(data = mtcars, mapping = aes(x = mpg, y = hp)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE)
Yielding a pretty plot like the one below

Then you can just use the following code:
summary(lm(formula = hp ~ mpg, data = mtcars))
which will yield the information you need for that linear model.
#>
#> Call:
#> lm(formula = hp ~ mpg, data = mtcars)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -59.26 -28.93 -13.45 25.65 143.36
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 324.08 27.43 11.813 8.25e-13 ***
#> mpg -8.83 1.31 -6.742 1.79e-07 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 43.95 on 30 degrees of freedom
#> Multiple R-squared: 0.6024, Adjusted R-squared: 0.5892
#> F-statistic: 45.46 on 1 and 30 DF, p-value: 1.788e-07
Going forward, please do check out some intro to R like Datacamp's Quick-R or Hadley Wickham's R for Data Science. You'll be figuring out these questions yourself in no time.