Isomorphisms in the localization of a category
Let $\mathcal{C}$ be a category, let $S \subseteq \operatorname{mor} \mathcal{C}$, and let $\bar{S}$ be the class of all morphisms in $\mathcal{C}$ that become invertible in $S^{-1} \mathcal{C}$. As t.b. pointed out in the comments, the 2-out-of-6 property + a three-arrow calculus is enough to guarantee $S = \bar{S}$, i.e. that the morphisms in $\mathcal{C}$ that become invertible in $S^{-1} \mathcal{C}$ are precisely the ones in $S$. (Note that the 2-out-of-6 property is a necessary condition).
If you are willing to take the fundamental theorem of three-arrow calculi (i.e. the one that gives necessary and sufficient conditions for two three-arrow zigzags (i.e. $\bullet \leftarrow \bullet \rightarrow \bullet \leftarrow \bullet$) to represent the same morphism) for granted, this is actually quite straightforward: see e.g. Proposition 36.4 in [Dwyer, Hirschhorn, Kan, and Smith] or proposition 3.5.10 in my notes.
The difficulty in the general case seems to boil down to the fact that the zigzag representing an inverse in $S^{-1} \mathcal{C}$ for a morphism in $\bar{S}$ may not consist of only morphisms in $\bar{S}$ (let alone $S$). A trivial example of this is the case where $S = \emptyset$ or $S = \{ \text{identities} \}$. However, observe that a three-arrow zigzag that represents an isomorphism in $S^{-1} \mathcal{C}$ necessarily consists of only morphisms in $\bar{S}$. This, I suppose, is the significance of 3.
Rather curiously, the fact that $\bar{S}$ is closed under retracts seems to play no role. For the record, let me point out that the 2-out-of-6 property does not imply closure under retracts. Consider the following category $\mathcal{C}$, $$\begin{array}{ccccc} X' & \to & X & \to & X' \\ \downarrow & & \downarrow & & \downarrow \\ Y' & \to & Y & \to & Y' \end{array}$$ where the composite across the top row is $\mathrm{id}_{X'}$ and the composite across the bottom row is $\mathrm{id}_{Y'}$, but $X' \to X$ and $Y' \to Y$ are not isomorphisms. Let $S$ be the set of all identity morphisms in $\mathcal{C}$, plus the morphism $X \to Y$. Then $S$ has the 2-out-of-6 property (because none of the morphisms in $S$ admit any non-trivial factorisation) but is not closed under retracts.
There is a small sliver of hope, though. Observe that the class of pairs $(\mathcal{C}, S)$ where $S = \bar{S}$ is closed under arbitrary products. (See lemma 3.1.11 in my notes.) Let us say that $(\mathcal{C}, S)$ is saturated if $S = \bar{S}$. The functor $(\mathcal{C}, S) \mapsto S^{-1} \mathcal{C}$ is a left adjoint, so it preserves colimits. In particular, it preserves filtered colimits. Moreover, given a small filtered diagram $\mathcal{A}_\bullet : \mathcal{J} \to \mathbf{Cat}$, a morphism in ${\varinjlim}_\mathcal{J} \mathcal{A}_\bullet$ is an isomorphism if and only if it is the image of an isomorphism in some $\mathcal{A}_j$; thus, filtered colimits preserve the property of being saturated. Hence, the class of pairs $(\mathcal{C}, S)$ where $S = \bar{S}$ is closed under ultraproducts. It is not hard to see that $(\mathcal{C}, S)$ is saturated if and only if some ultrapower is saturated, so the Keisler–Shelah theorem implies the class of saturated $(\mathcal{C}, S)$ is closed under elementary equivalence. It is therefore an elementary class, i.e. axiomatisable by a theory in the first-order language of categories with an extra unary predicate. Perhaps someone clever will be able to find an explicit description of this theory.