Is the definition of tangent line the same as for tangent plane, but only in $\mathbb{R}^2$ instead of $\mathbb{R}^3$?
I.e. that the definition for tangent line would be $$T_{(x_0,y_0)}(f)=\{(x,y) \in \mathbb{R}^2 : (x-x_0, y-y_0) \cdot \nabla f(x_0,y_0)=c\}$$?
I think the biggest confusion is that people aren't introduced to vectors until calculus i.e if you see the general equation of a line $ax+by = c$ it is not apparent to you that $\vec{n} = \langle a,b \rangle$ is perpendicular to the direction of the line. In other words, given a point $(x_0,y_0)$ in the plane, the line passing through $(x_0,y_0)$ is the set of all $(x,y)$ such that $\langle x-x_0, y-y_0 \rangle \cdot \langle a,b \rangle = 0 $ for some vector $\langle a,b \rangle$. If you clean this equation up, you get the formal equation of a line $a'x+b'y = c'$. Now from here, the typical definition you see for a plane in 3-space follows immediately and you see how to generalize. The introduction of a function $f$ is only needed if you have a way initially of describing your object.
The other confusion comes from the fact that you can go through your undergraduate career without seeing the definition of the derivative for a map $f: \mathbb{R}^n \to \mathbb{R}^m$ (this was my case). In multivariable calculus you consider the special case where $m = 1$ and call the differential of $f$, the gradient. Hopefully this cleared something up for you.
$\textbf{Edit}$:If you are looking for tangent lines in the plane, the graph of $f$ must be contained in $\mathbb{R}^2$ i.e $f: A \subset \mathbb{R} \to \mathbb{R}$. The gradient notation here doesn't make sense, you need to use the derivative notation for 1-variable. The tangent line at $(x_0,y_0)$ is given by:
$$ y-y_0= f'(x_0)(x-x_0) \iff \langle x-x_0, y-y_0 \rangle \cdot \langle f'(x_0),-1 \rangle = 0$$