The typical place where students first hear the term "ANOVA: Analysis of Variance" is when the class extends the two-sample t-test to many samples (three, four, a zillion) and learn to test this with an F-test instead of a t-test.
What's happening under the hood is that this classical ANOVA is a regression model. Fix one of the groups as the baseline category which will be subsumed by the intercept (your choice won't affect the p-value or F-stat). Next, test if any of the other groups have a mean different from this baseline group. This is tested by checking if any of the coefficients on the indicator variables for the non-baseline groups are significantly different from zero, using an F-test of nested regression models: an intercept-only model that assumes all means to be equal is nested within a model that has an additional coefficient parameter for each non-baseline group that allows any of those groups to have a different mean.
For three groups, the regression model would be written as:
$$
\mathbb E\left[
y_i
\right] = \beta_0 + \beta_1x_{i, \text{group1}} + \beta_2x_{i, \text{group2}}
$$
For $k$ groups, the regression model is:
$$
\mathbb E\left[
y_i
\right] = \beta_0 + \beta_1x_{i, \text{group1}} + \beta_2x_{i, \text{group2}} +\dots + \beta_{k - 1}x_{k-1, \text{group }k-1}
$$
Where this gets extended to the full linear model (and beyond) is that none of this made any real assumptions about what the $x$ features are. Therefore, if you have three variables and want to check if two of them have nonzero coefficients, you might run regressions like the following.
$$
\mathbb E\left[
y_i
\right] = \beta_0 + \beta_1x_{i, 1}\\
\text{nested within}\\
\mathbb E\left[
y_i
\right] = \beta_0 + \beta_1x_{i, 1} + \beta_2x_{i, 2} + \beta_3x_{i, 3}
$$
Running an F-test of these nested models (exactly what we do in the basic ANOVA to test the equality of $k$ means) means that we are testing the following null and alternative hypotheses.
$$
H_0\text{: } \beta_2 = \beta_3 = 0\\
H_a\text{: } H_0 \text{ is false (at least one of }\beta_2\text{ and }\beta_3\text{ are nonzero)}
$$
When you dig into the math, you'll see that this relates to comparing the residual variance from the simple model to the residual variance from the complex model in which the simple model is nested, hence the term analysis of variance.
In your specific example, you have a simple linear regression. If you want to test if the slope is nonzero, your F-test would compare the simple linear regression with both a slope and an intercept to a model with just an intercept. When you do an F-test on just one parameter, that is equivalent to a t-test on that one parameter.
The F-test winds up being much more general than just comparing the means of $k$ groups!
RELATED CROSS VALIDATED LINKS
Why is ANOVA equivalent to linear regression?
What's the difference between regression and analysis of variance?
What are chunk tests?
I personally learned this material from a course that used Alan Agresti's Foundations of Linear and Generalized Linear Models. Section $3.2.1$ develops basic ANOVA as a regression model, and then $3.3.2$ develops the general "chunk" test. (For years, I have kept that book near where I work, either at my desk at the office or near my workspace at home.)