If $X$ is a differentiable manifold, so that both notions are defined, then they coincide.
The ``patching'' of local orientations that you describe can be expressed more formally as follows: there is a locally constant sheaf $omega_R$ of $R$-modules on $X$ whose stalk at a point is $H^n(X,Xsetminus{x}; R).$ Of course, $omega_R = Rotimes_{mathbb Z} omega_{mathbb Z}$.
This sheaf is called the orientation sheaf, and appears in the formulation of Poincare duality for not-necessarily orientable manifolds. It is not the case that any section of this sheaf gives an orientation. (For example, we always have the zero section.)
I think the usual definition would be something like a section which generates each stalk.
I will now work just with $mathbb Z$ coefficients, and write $omega = omega_{mathbb Z}$.
Since the stalks of $omega$ are free of rank one over $mathbb Z$, to patch them together you
end up giving a 1-cocyle with values in $GL_1({mathbb Z}) = {pm 1}.$ Thus underlying
$omega$ there is a more elemental sheaf, a locally constant sheaf that is a principal bundle for ${pm 1}$. Equivalently, such a thing is just a degree two (not necessarily connected) covering space
of $X$, and it is precisely the orientation double cover of $X$.
Now giving a section of $omega$ that generates each stalk, i.e. giving an orientation of $X$, is precisely the same as giving a section of the orientation double cover (and so $X$ is orientable, i.e. admits an orientation, precisely when the orientation double cover is disconnected).
Instead of cutting down from a locally constant rank 1 sheaf over $mathbb Z$ to just a double cover, we could also build up to get some bigger sheaves.
For example, there is the sheaf $mathcal{C}_X^{infty}$ of smooth functions on $X$.
We can form the tensor product $mathcal{C}_X^{infty} otimes_{mathbb Z} omega,$
to get a locally free sheaf of rank one over ${mathcal C}^{infty}$, or equivalently, the sheaf of sections of a line bundle on $X$. This is precisely the line bundle of top-dimensional forms on $X$.
If we give a section of $omega$ giving rise to an orientation of $X$, call it $sigma$, then we certainly get a nowhere-zero section
of $mathcal{C}_X^{infty} otimes_{mathbb Z} omega$, namely $1otimessigma$.
On the other hand, if we have a nowhere zero section of $mathcal{C}_X^{infty} otimes_{mathbb Z}
omega$, then locally (say on the the members of some cover ${U_i}$ of $X$ by open balls) it has the form $f_iotimessigma_i,$ where $f_i$ is a nowhere zero real-valued function on $U_i$ and $sigma_i$ is a generator of $omega_{| U_i}.$
Since $f_i$ is nowhere zero, it is either always positive or always negative; write
$epsilon_i$ to denote its sign. It is then easy to see that sections $epsilon_isigma_i$
of $omega$ glue together to give a section $sigma$ of $X$ that provides an orientation.
One also sees that two different nowhere-zero volume forms will give rise to the same orientation if and only if their ratio is an everywhere positive function.
This reconciles the two notions.