Var (X) = Cov (X,X)
Therefore
Slope = Cov(X,Y) / Cov (X,X)
You have a common term in the numerator and denominator: (say (X - Xbar)).
If you cancel this term you are left with.
(Y - Ybar) / (X - Xbar).
The regression line always runs through the point of means (Xbar,Ybar) so this is just a “rise over run” ratio (ie slope for a straight line).