This is a well-known fact. A simple proof : setting $y=B^{1/2}x$, we have $\|y\|^2\le y^TB^{-1/2}AB^{-1/2}y$, that is $I_n\le B^{-1/2}AB^{-1/2}$. The eigenvalues of the latter symmetric matrix are thus $\ge1$. Its inverse $B^{1/2}A^{-1}B^{1/2}$ has eigenvalues $\le1$, that is $B^{1/2}A^{-1}B^{1/2}\le I_n$. This gives $z^TB^{1/2}A^{-1}B^{1/2}z\le\|z\|^2$. Setting $w=B^{1/2}z$, this writes $w^TA^{-1}z\le z^TB^{-1}z$, that is $A^{-1}\le B^{-1}$.
More generally, Loewner theory tells you what are the operator-monotone functions. By definition, a numerical function $f:I\rightarrow{\mathbb R}$ ($I$ an interval) is monotone operator if whenever $A,B$ are real symmetric matrices with spectra included in $I$, the inequality $A\le B$ implies $f(A)\le f(B)$. The beautiful theorem is that $f$ is operator monotone if and only if it admits a holomorphic extension to the upper half plane $\Re z>0$, with values in the upper half plane (of course this extension is unique). In particular, operator monotone functions are analytic ! For instance, if $\alpha>0$, the map $A\mapsto A^\alpha$ is monotone operator if and only if $\alpha\le1$ !!
Loewner theorey is explained in R. Bhatia's book.