  A result (Corollary 4.3) in an article by Uhlenbeck (1985) asserts that the
$W^{1,p}$-distance between the gauge-equivalence class of a connection $A$ and
the moduli subspace of flat connections $M(P)$ on a principal $G$-bundle $P$
over a closed Riemannian manifold $X$ of dimension $d\geq 2$ is bounded by a
constant times the $L^p$ norm of the curvature, $\|F_A\|_{L^p(X)}$, when $G$ is
a compact Lie group, $F_A$ is $L^p$-small, and $p>d/2$. While we prove that
this estimate holds when the Yang-Mills energy function on the space of Sobolev
connections is Morse-Bott along the moduli subspace $M(P)$ of flat connections,
it does not hold when the Yang-Mills energy function fails to be Morse-Bott,
such as at the product connection in the moduli space of flat $\mathrm{SU}(2)$
connections over a real two-dimensional torus. However, we prove that a useful
modification of Uhlenbeck's estimate always holds provided one replaces
$\|F_A\|_{L^p(X)}$ by a suitable power $\|F_A\|_{L^p(X)}^\lambda$, where the
positive exponent $\lambda$ reflects the structure of non-regular points in
$M(P)$. The proof of our refinement involves gradient flow and Morse theory for
the Yang-Mills energy function on the quotient space of Sobolev connections and
a Lojasiewicz distance inequality for the Yang-Mills energy function. A special
case of our estimate, when $X$ has dimension four and the connection $A$ is
anti-self-dual, was proved by Fukaya (1998) by entirely different methods.
Lastly, we prove that if $A$ is a smooth Yang-Mills connection with small
enough energy, then $A$ is necessarily flat.
