Einstein's equivalence principle can be stated in several ways. In its strong form, it implies for a body subjected to a gravitational field that, in every point of space, there exists a local frame of reference where the said body is free-falling $-$ which is equivalent to linearize the gravitational field by Taylor expansion $-$ and that this frame of reference can't be distinguished experimentally from a referential frame without gravitation, that is an inertial frame where the body's motion is completely free.
For the sake of simplicitly, let's consider a one-dimensional space with a frame of reference $(z,t)$ where a body of mass $m$ follows a free motion. In consequence, its wavefunction $\phi(z,t)$ satisfies the following Schrödinger equation :
$$
i\hbar\frac{\partial}{\partial t}\phi(z,t) = -\frac{\hbar^2}{2m}\frac{\partial^2}{\partial z^2}\phi(z,t)
\tag{1}
$$
Now, let's consider another body of mass $m$, which is subjected to a gravitational field in the referential frame $(z',t')$. This gravitational field may be approximated locally by the linear potential $V(z',t') = mgz'$, which leads to a local free fall motion by Newton's law, i.e. $\frac{\mathrm{d}^2z'}{\mathrm{d}t'^2} = -g$. Let's name $\psi(z',t')$ the wavefunction associated to the said (locally) free-falling body. Its Schrödinger equation is given by
$$
i\hbar\frac{\partial}{\partial t'}\psi(z',t') = -\frac{\hbar^2}{2m}\frac{\partial^2}{\partial z'^2}\psi(z',t') + V(z',t')\psi(z',t')
\tag{2}
$$
How are the two frames of reference related to each other ? Assuming a non-relativistic context, one can take $t' = t$. Then, the transformation
$$
\begin{cases}
z = z' + \frac{1}{2}gt'^2 \\
t \,= t' \\
\end{cases}
$$
produces an inertial frame actually, because the free fall in the frame $(z',t')$ is mapped to a free motion with respect to $(z,t)$, given that
$$
\frac{\mathrm{d}^2z}{\mathrm{d}t^2} = \frac{\mathrm{d}^2}{\mathrm{d}t'^2}\left(z' + \frac{1}{2}gt'^2\right) = \frac{\mathrm{d}^2z'}{\mathrm{d}t'^2} + g = -g+g = 0.
$$
As said in the statement of Einstein's principle above, the free body and the free-falling body are experimentally indistinguishable inside the inertial frame $(z,t)$. In a quantum perspective, it means that their wavefunctions, expressed with respect to this same frame, can differ only by a global phase $-$ because a global phase cannot be measured experimentally. As a consequence, one should be able to find a solution of the form $\psi(z,t) = \phi(z,t)e^{iS(z,t)/\hbar}$. This form implies :
$$
\begin{align}
\frac{\partial\psi}{\partial t'}
&= \left(\frac{\partial t}{\partial t'}\frac{\partial}{\partial t} + \frac{\partial z}{\partial t'}\frac{\partial}{\partial z}\right) \phi\,e^{iS/\hbar} \\
&= \left(\frac{\partial}{\partial t} + gt\frac{\partial}{\partial z}\right) \phi\,e^{iS/\hbar} \\
&= \left(\phi_t + gt\phi_z + \frac{i}{\hbar}(S_t + gtS_z)\phi\right)e^{iS/\hbar}
\end{align}
$$
where the subscripts denote partial derivatives and the arguments have been omitted in order to save up space. Similarly, one has :
$$
\frac{\partial^2\psi}{\partial z'^2}
= \frac{\partial^2}{\partial z^2} \phi\,e^{iS/\hbar}
= \left(\phi_{zz} + \frac{2i}{\hbar}S_z\phi_z - \frac{1}{\hbar^2}(S_{zz}+S_z^2)\phi\right)e^{iS/\hbar}
$$
Finally, taking Eq. $(1)$ into account, one may rewrite Eq. $(2)$ as follows :
$$
i\hbar gt\phi_z - (S_t + gtS_z)\phi = -\frac{i\hbar}{m}S_z\phi_z + \frac{1}{2m}(S_{zz}+S_z^2)\phi + mg\left(z-\frac{1}{2}gt^2\right)\phi
$$
This differential equation can be split into the system
$$
\begin{cases}
0 = gt + \frac{S_z}{m} \\
0 = S_t + gtS_z + \frac{S_{zz}+S_z^2}{2m} + mg\left(z-\frac{1}{2}gt^2\right)
\end{cases}
$$
by gathering together the terms with respect to $\phi_z$ and $\phi$ respectively. The first equation leads to $S(z,t) = -mgzt + f(t)$, where $f$ is an arbitrary function of time. Thus, one has $S_z = -mgt$ and $S_{zz} = 0$, as well as $S_t = -mgz + f'(t)$, so that the second equation is reduced to $0 = f'(t) - mg^2t^2$, hence $f(t) = \frac{1}{3}mg^2t^3$ and thus $S(z,t) = -mgzt + \frac{1}{3}mg^2t^3$. Coming back to the initial frame of reference in the end, one ends up with the wanted solution, i.e.
$$
\begin{align}
\psi(z',z')
&= \phi(z',t') e^{iS(z',t')/\hbar} \\
&= \phi(z',t') \exp\left(\frac{i}{\hbar}\left(-mg\left(z'+\frac{1}{2}gt'^2\right)t' + \frac{1}{3}mg^2t'^3\right)\right) \\
&= \phi(z',t') \exp\left(-\frac{i}{\hbar}mgt'\left(z' + \frac{1}{6}gt'^2\right)\right)
\end{align}
$$