Morally, yes, but in detail I would suggest a few edits to what you wrote.
First, I would tend to write the fundamental variables with lower indices: the metric $g_{\mu\nu}$ (rather than the inverse metric $g^{\mu\nu}$) and the derivative of the metric $\partial_\mu g_{\nu\lambda}$ (rather than the inverse metric times the first deritvative of the inverse metric, $\partial^\mu g^{\nu\lambda}=g^{\mu\alpha} \partial_\alpha g^{\nu\lambda}$). The reason is mostly aesthetic, although it is important to realize that the true partial derivative operator has a downstairs index $\partial_\mu$, and the partial derivative with an upstairs index is just shorthand for a matrix product of the inverse metric with the partial derivative.
Second, in the normal, covariant way it is written,
\begin{equation}
S = \int {\rm d}^4 x \sqrt{-g} R,
\end{equation}
the Einstein-Hilbert action actually involves second derivatives of the metric. You can see this since, schematically, the Riemann curvature scalar $R$ is related to the Christoffel symbols $\Gamma$ via $R \sim \partial \Gamma + \Gamma \Gamma$, and since $\Gamma\sim g^{-1} \partial g$ depends on derivatives of the metric, keeping only the highest derivative terms we expect that $R \sim \partial \Gamma \sim \partial \partial g $ (and an explicit calculation confirms that the second derivative terms we expect based on this schematic argument really are there and do not cancel). The equations of motion still turn out to be second order (and not third order like you might naively expect based on the appearance of second derivatives in the action), because when you vary the action you find the third derivative terms take the form of a total derivative, which we can assume vanishes on the boundary (or, even better, we can add the Gibbons-Hawking-York boundary term to cancel these third derivative terms in the variation of the action).
Finally, since $\sqrt{-g}$ is itself a function of the metric, I would consider it optional whether or not you include it explicitly in the Lagrangian.
Putting this together, I would re-express the form in your question as
\begin{equation}
S = \int {\rm d}^4 x \sqrt{-g} \mathcal{L}(g_{\mu\nu}, \partial_\mu g_{\nu\lambda}, \partial_\mu \partial_\nu g_{\lambda \sigma})
\end{equation}