Consider the vector field $$X=(y-10x)\partial_x-x\partial_y$$ it is not a gradient vector field with respect to the standard Riemannian metric of $\mathbb{R}^2$ but it is a gradient vector field with respect to the Riemannian metric $$g=5dx\otimes dx-dx\otimes dy -dy\otimes dx +5dy\otimes dy$$
For this metric we have $X=grad_g f$ where $f(x,y)=-1/2(49x^2-10xy+y^2)$
As an interesting example, please search "Shahshahani Gradient". This gradient corresponds to a Riemannian metric on the phase space of certain vector field which is not a gradient system with respect to the standard metric but is a gradient vector field with respect to the Shahshahani Riemannian metric.
See here for some explanation on Shahshahani metric.