We just covered limits in higher dimensions in my Vector Calculus class, and when I saw limits approached along nonlinear paths, it got me thinking that partial derivatives seem like they could be generalized to derivatives taken with respect to a function (perhaps this is what functional derivatives are, but I couldn't very well understand the articles I read on those).
Intuitively, I mean that if a partial derivative is thought of as the derivative of the curve created by taking a slice of a surface parallel to the x- or y-axes, does there exist some operation which would give the tangent line to the curve generated by slicing the surface along a function?
You have a good intuition. However, if I give you a nice (smooth) function, then as I approach some point of a surface, the nice function will look more and more like a straight line. Since limits only care about behavior very close to a point, we cannot see the difference between straight lines and curved lines once we zoom in sufficiently far. As such no new ideas will come from considering functions as opposed to straight lines.
However, you are very close to discussing something known as the Gateaux derivative (indeed, a functional derivative as you thought). Since you are learning calculus, I will avoid giving details, but perhaps the following is a helpful way to think of the Gateaux derivative using the language you already know from vector calculus.
You have presumably seen vectors as elements of $\mathbb{R}^n$, but vectors can be very general objects. For example, functions themselves can be thought of as vectors! In a function space, the points/vectors are functions: one vector is the function $f(x) = x$ and another vector is the function $g(x) = \cos(x)$, and so on.
Once we are comfortable thinking about functions as vectors, we may begin defining calculus on these vectors much like you are currently doing in vector calculus. A function, $F$, on these vectors is a "function on functions:" $F$ inputs a function $f$ and outputs another function $g$. For example, $F$ may multiply the input function by 2: $F(f) = 2f$.
We are now ready to think about functional derivatives. The Gateaux derivative is completely analogous to the partial derivative: we fix a vector (which fixes a "direction") $u$, and consider the instantaneous change of $F$ along $u$. We say that $F$ has Gateaux differential at $f$ in the direction $u$ if the following limit exists:
$$ \lim_{\tau \to 0} \frac{F(f+\tau u)-F(f)}{\tau}.$$
I hope this helps a bit! What you are asking are very interesting questions; you should follow up with your instructor to discuss this in more detail.