**Edit:** I'm leaving the old post below, but before I want to write the proof as suggested by Bruce from his book, which uses the ideas in a more efficient way.

Assume that $\|p-q\|<1$, with $p,q\in A$, a unital C$^*$-algebra. Let $x=pq+(1-p)(1-q)$. Then, as $2p-1$ is a unitary,
$$
\|1-x\|=\|(2p-1)(p-q)\|=\|p-q\|<1.
$$
So $x$ is invertible. Now let $x=uz$ be the polar decomposition, $z=(x^*x)^{1/2}\in A$. Then $u=xz^{-1}\in A$. Also, $px=pq=xq$, and $qx^*x=qpq$, so $qx^*x=x^*xq$, and then $qz=zq$. Then
$$
pu=pxz^{-1}=xqz^{-1}=uzqz^{-1}=uqzz^{-1}=uq.
$$
So $q=u^*pu$.

=============================================
*(the old post starts here)*

*(A good friend pointed me to the ideas in this answer, so I'm sharing them here)*

The result holds in any unital C$^*$-algebra. So assume that $\|p-q\|<1$, with $p,q$ in a unital C$^*$-algebra $A\subset B(H)$.

**Claim 1:** There is a continuous path of projections joining $p$ and $q$.

*Proof.* Let $\delta\in(0,1)$ with $\|p-q\|<\delta$. For each $t\in[0,1]$, let $x_t=tp+(1-t)q$. Then
$$
\|x_t-p\|=\|(1-t)(p-q)\|<\delta(1-t),
$$
$$
\|x_t-q\|=\|t(p-q)\|<\delta t.
$$
This, together with the fact that $x_t$ is selfadjoint, implies that $\sigma(x_t)\subset K=[-\delta/2,\delta/2]\cup[1-\delta/2,1+\delta/2]$ (since $\min\{t,1-t\}\leq1/2$). Now let $f$ be the continuous function on $K$ defined as $0$ on $[-\delta/2,\delta/2]$ and $1$ on $[1-\delta/2,1+\delta/2]$. Then, for all $t\in[0,1]$, $f(x_t)\in A$ is a projection. And
$$
t\to x_t\to f(x_t)
$$
is continuous, completing the proof of the claim.

**Claim 2:** We may assume without loss of generality that $\|p-q\|<1/2$.

This is simply a compacity argument, using that each projection in the path $f(x_t)$ is very near another projection in the path. The compacity allows us to make the number of steps finite, and so if we find projectons $p=p_0,p_1,\ldots,p_n=q$ and unitaries with $u_kp_ku_k^*=p_{k+1}$, we can multiply the unitaries to get the unitary that achieves $q=upu^*$.

**Claim 3:** If $\|p-q\|<1/2$, there exists a unitary $u\in A$ with $q=upu^*$.

Let $x=pq+(1-p)(1-q)$. Then
$$
\|x-1\|=\|2pq-p-q\|=\|p(q-p)+(p-q)q\|\leq2\|p-q\|<1,
$$
so $x$ is invertible. Let $x=uz$ be the polar decomposition. Then $u$ is a unitary. Note that
$$
qx^*x=q(qpq+(1-q)(1-p)(1-q))=qpq,
$$
so $q$ commutes with $x^*x$ and then with $z=(x^*x)^{1/2}$. Note also that $px=xq$, so $puz=uzq=uqz$. As $z$ is invertible, $pu=uq$, i.e.
$$
q=u^*pu.
$$
Note that $u=xz^{-1}\in A$.