Proving Any connected subset of R is an Interval Common Proof:

Suppose $S$ is not an interval of $R$.
Then by Interval Defined by Betweenness, $∃x,y∈S$ and $z\in R∖S$ such that $x<z<y$.
Consider the sets $A_1=S∩(−∞,z)$ and $A_2=S∩(z,+∞)$.
Then $A_1,A_2$ are open by definition of the subspace topology on S.
Neither is empty because they contain x and y respectively.
They are disjoint, and their union is S, since z∉S.
Therefore $A_1∣A_2$ is a separation of S.
It follows by definition that S is disconnected.

But why are $A_1,A_2$ open sets? 
 A: In the subspace topology, $A_1$ is open (in $S$) if and only if it is the intersection of $S$ with an open set in $\mathbb{R}$; this is clearly the case here.
A: Do you know what the subspace topology is?  The larger set is $\Bbb R$ with the usual topology.  Since $S \subseteq \Bbb R$, we can equip $S$ with the subspace topology, i.e., the topology where each $V$ that is open in S is of the form $V = S \cap U$ with $U \subseteq \Bbb R$ open in $\Bbb R$.
Since $A_{1} = S \cap (-\infty, z)$, and the interval $(-\infty, z)$ is open in $\Bbb R$, then $A_{1}$ is open in $S$ with the subspace topology.  Similarly, $A_{2}$ is open in $S$ with the subspace topology.
Please note the following very important fact: we determine whether a set is connected or disconnected based on the open sets in its topology.  What I mean is, if $(X, \mathcal{T})$ is a topological space, and $Y \subseteq X$ is a subset, we determine whether $Y$ is connected or not using the sets in the subspace topology of $Y$.
So, the set $[0,1) \cup (2,3]$ is disconnected.  Why?  Let $A = [0,1)$ and $B = (2,3]$.  Neither $A$ nor $B$ are open in $\Bbb R$, but both of them are open in $[0,1) \cup (2,3]$ under the subspace topology of this set.  Since they are open in the subspace topology, and clearly both are disjoint and nonempty, and $A \cup B$ is the entire set, then $[0,1) \cup (2,3]$ is disconnected. 
A: I think where you're getting confused is that $A_1$ and $A_2$ are open subsets of $S$, but just because something is open in a subspace of $\mathbb{R}$ doesn't mean it's open in $\mathbb{R}$.  Consider the set $E = [0,1)$.  We know that $(-1,.5)$ is open in $\mathbb{R}$ hence 
$$
(-1,.5) \cap [0,1) \;\; =\;\; [0, .5)
$$
is an open subset of $E$, but it is clearly not open in $\mathbb{R}$.  Your proof by contrapositive is correct though, regardless of what $(-\infty, z) \cap S$ looks like in $\mathbb{R}$.  
