The easiest way is to get your position as a function of time - instead of defining your trajectory as a curve $y(x)$, use the separate equations $x(t)$ and $y(t)$. Then, the acceleration as a function of time will just be the vector $\langle \frac{d^2 x}{dt^2}, \frac{d^2 y}{dt^2}\rangle$.
If for some reason that's not an option, given the curve $y(x)$, we can differentiate it to get
$$\frac{dy}{dx}=\frac{\frac{dy}{dt}}{\frac{dx}{dt}}$$
Since the velocity vector is $\langle \frac{dx}{dt},\frac{dy}{dt}\rangle$, the angle $\theta_v$ that the velocity vector makes with the horizontal axis is given by
$$\theta_v = \tan^{-1}\left(\frac{\frac{dy}{dt}}{\frac{dx}{dt}}\right)=\tan^{-1}\left(\frac{dy}{dx}\right)$$
But finding the direction of the velocity vector is easy, because the velocity vector always points along the tangent to your curve $y(x)$, so you can get that information directly from the curve. However, the acceleration vector is not subject to the same restrictions. It can have both a tangential component and a normal component. The normal component:
$$a_n = \frac{|v|^2}{R}$$
changes only the direction of the velocity vector. As you can see, it does have some dependence on the instantaneous radius of curvature $R$ of the curve $y(x)$, but it also depends on the magnitude of the velocity vector $v$, which we do not have because we aren't given the functions $x(t)$ or $y(t)$. So we can't calculate the normal component. The tangential component changes only the magnitude of the velocity vector (and whether it's moving "forward" or "backward" along the curve), which entirely depends on how quickly the particle moves along the curve and not on the shape of the curve itself. So we can't calculate either component separately. What we want is the angle between the velocity and acceleration vectors
$$\theta_{va} = \tan^{-1}\left(\frac{a_n}{a_t}\right) = \tan^{-1}\left(\frac{\frac{v^2}{R}}{\frac{dv}{dt}}\right)$$
from which we cannot, in general, eliminate the dependence on the magnitude of the velocity. So, in general, you cannot find the direction of the acceleration vector from the shape of the path $y(x)$ alone. You must have some information about the motion as a function of time.
That said, there are two special cases in which you can get the direction of the acceleration vector based only on the shape of the curve:
If the motion is at constant speed, then the magnitude of the velocity vector $v$ is fixed, and so $a_t=0$. In that case, the acceleration, if it is nonzero, will always point in the direction perpendicular to the curve (and by extension, perpendicular to the velocity vector).
If the motion is in a straight line, then the direction of the velocity vector is fixed, and so $a_n=0$. In that case, the acceleration will either be parallel or antiparallel to the velocity vector (depending on if the speed is increasing or decreasing at a particular moment in time).
And just as a final note, taking the second derivative of the curve $y(x)$ gives you
$$\frac{d^2 y}{dx^2} = \frac{\frac{d^2 y}{dt^2}\frac{dx}{dt}-\frac{d^2x}{dt^2}\frac{dy}{dt}}{\left(\frac{dx}{dt}\right)^3}$$
which doesn't give you any way of separating the two second time-derivatives to get the ratio $\frac{\frac{d^2y}{dt^2}}{\frac{d^2x}{dt^2}}$ that you would need to calculate the direction of the acceleration vector. So you can't use the same trick as we used to determine the direction of the velocity vector, either.