Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
This ODE is extremely unlikely to have an explicit solution. Mathematica cannot do anything with this ODE even when $g(x)\equiv x$.
Here is an image of the corresponding Mathematica notebook:
And here is a link to the Mathematica notebook itself.