Hello,
The error in the slope (fit parameter) comes from the fit result covariance. Since the fit includes the statical error of the histogram bins, the covariance includes the statistical uncertainty from the bin content fluctuations.
Best regards
Lorenzo