If $f:[0,1]\to A\times B$ is a homeomorphism, then either $A$ or $B$ is a singleton. If there exists a homeomorphism $f$ between the closed unit interval and some cartesian product $A\times B$, either $A$ is a singleton or $B$ is a singleton.
The proof I have argues as follows:
Since $[0,1]$ is connected, $A\times B$ is, so $A$ and $B$ are as well. If $a_1,a_2 \in A$ and $b_1,b_2\in B$, consider the four sets $f^{-1}(\{a_1\}\times B)$, $f^{-1}(\{a_2\}\times B)$, $f^{-1}(A\times \{b_1\})$, and $f^{-1}(A\times \{b_2\})$. These are all nondegenerate closed intervals, with each pair intersecting exactly once. No such configuration exists in $[0,1]$, thus we have a contradiction.
I don't understand why the $f^{-1}(\{a_1\}\times B)$ and so on are closed? Other proofs are welcome, but be clear an explanation of this argument is what I'm asking for.
(question edited for clarity)
 A: 
I don't understand why the $f^{−1}(\{a_1\}\times B)$ and so on are closed?

$\{a_1\}\times B$ is closed in $X\times Y$ by the definition of product topology and since $f$ is continous then $f^{−1}(\{a_1\}\times B)$ is closed in $I$.
Note that $\{a_1\}\subseteq A$ is closed because $A$ is Hausdorff as a subspace of $I$ (formally $A$ is homeomorphic to $A\times\{b\}$ which is a subspace of $A\times B$ which is homeomorphic to $I$ which is Hausdorff).

These are all nondegenerate closed intervals

No, you've only proved that these are closed subsets of $I$, not necessarly intervals. This is true, but requires a proof.

No such configuration exists in $[0,1]$

Again, requires a proof. Your approach is a lot harder formally to prove then you think. So let's try easier approach.

The most basic idea is to talk about cut-points. If $X$ is a connected topological space then $x\in X$ is a cut-point if $X\backslash\{x\}$ is not connected. It can be easily proved that if $f:X\to Y$ is a homeomorphism then $f$ maps cut-points to cut-points.
Denote by $I=[0,1]$.
Lemma. Let $X,Y$ be path-connected spaces with at least two points each. Then $X\times Y$ does not have cut-points.
Proof. Let $(x_0,y_0)\in X\times Y$ and consider $A=X\times Y\backslash\{(x_0,y_0)\}$. Let $(a,b)\in A$ be such that $a\neq x_0$ and $b\neq y_0$. Note that both $X,Y$ have at least two points so such a point exists. Take arbitrary $(x,y)\in A$. We will show that we can connect $(x,y)$ to $(a,b)$ via path and thus that $A$ is path connected. This will contradict that $(x_0,y_0)$ is a cut-point.
Without a loss of generality we may assume that $x\neq x_0$. Consider a path $\lambda:I\to Y$ such that $\lambda(0)=y$ and $\lambda(1)=b$. This path induces a path
$$\Lambda:I\to A$$
$$\Lambda(t)=(x, \lambda(t))$$
This path connects $(x,y)$ with $(x, b)$. Note that the path is in $A$. That's very important since we are showing that $A$ is path connected.
Now take path $\lambda':I\to X$, $\lambda'(0)=x$ and $\lambda'(1)=a$. This path induces a path
$$\Lambda':I\to A$$
$$\Lambda'(t)=(\lambda'(t), b)$$
which connects $(x,b)$ to $(a,b)$. Composition of these two paths gives a path between $(a,b)$ and $(x,y)$. $\Box$
So now lets prove that $I$ cannot be homeomorphic to $A\times B$ with $A,B$ not singletons.
Proof. Assume that that's not the case, i.e. let $f:I\to A\times B$ be a homeomorphism with both $A,B$ having at least two points.


*

*Both $A,B$ are path connected. Indeed, both are images of $I$ via $\pi\circ f$ where $\pi$ is a projection.

*Lemma applies, $A\times B$ does not have cut-points.

*$I$ does have cut-points, e.g. $\frac{1}{2}$.

*Homeomorphisms preserve cut-points.
Contradiction. $\Box$
Also note that no additional assumptions on $A,B$ are needed, you don't have to show or assume that they are Hausdorff.
A: The sets $f^{-1}(\{a_1\}\times B)$ etc., are connected closed subsets of $[0,1]$. The connected subsets of $[0,1]$ are intervals.
I would attack the question a different way: the set $[0,1]$ can be disconnected by removing one point. Prove that $A\times B$ cannot be disconnected by removing one point whenever $A$ and $B$ are connected spaces each with more than one point.
A: Since $f^{-1}:A\times B\to [0,1]$ is a homeomorphism and $\{a_1\}\times B$ is closed in $A\times B$ and connected, $f^{-1}(\{a_1\}\times B)$ is also closed in $[0,1]$ and connected. But a closed and connected subset of $[0,1]$ is a closed interval. 
In response to the comments, here is an argument to show that $\{a_1\}\times B$ is closed in $A\times B$. Since $\pi: A\times B\to A, (a,b)\mapsto a$ is a continuous map, if $\{a_1\}$ is closed in $A$, then $\{a_1\}\times B=\pi^{-1}(\{a_1\})$ is also closed. Pick $a\in A$, $a\neq a_1$. Pick $b\in B$. Then $(a,b)\neq (a_1,b)$ in $A\times B=[0,1]$ which is Hausdorff, thus there is a neighborhood $U_a$ of $a$ in $A$ and a neighborhood $U_b$ of $b$ in $B$ such that $(a_1,b)\notin U_a\times U_b$. This implies $a_1\notin U_a$, which then implies that $A\setminus\{a_1\}$ is open in $A$, thus $\{a_1\}$ is closed in $A$.
A: We have by hypothesis that $f$ is a homeomorphism. In particular, we have $f$ continuous. This means by continuity, the pre-image of an open (closed) set is open (closed). Also, if we assume the standard topology, we have that $[0,1]$ is compact, and the continuous image of a compact set is also always compact. Namely, we have that $f([0,1])\subset A\times B$ is compact. Note that singleton sets are certainly compact, and cartesian products of compact sets are compact, so certainly $\{a\}\times B$ and $A\times \{b\}$ fit. It remains to show this is the only valid case. 
WLOG, if $A$ is compact, and $B$ is not, then $A\times B$ cannot be compact. 
The next case to consider is if neither $A$ nor $B$ is compact, but this would make it impossible for $A\times B$ to be compact, which contradicts the fact that continuous image of a compact set is compact. 
Finally, assume WLOG that $U\subset A$, we still have $f([0,1])\subset U\times B$, and $U\times B$ must be compact, because if it wasn't, then we again reach the contradiction in the previous paragraph: a continuous image of a compact set must be compact. 
Note that since we have a homeomorphism, $f^{-1}$ is also continuous. 
Now, suppose we delete a point $a\neq 0,1$ from $U\times B$, so we have $f^{-1}(U\setminus\{a\}\times B)\in [0,1]\setminus \{f^{-1}(a)\}$. The continuous image of a connected set is also connected, and $[0,1]\setminus \{f^{-1}(a)\}$ is not connected. 
We can be sure that other $a's$ exist in the image of $f^{-1}$ because we have a continuous bijection by assumption, namely, no two points $b,c\in U\times B$ can map to the same point in $[0,1]$, as injectivity would fail, so just delete any $a$ that isn't at the boundary to show connectedness is broken. 
Note that if $U$ was singleton, then deleting a point would leave $\emptyset \times B$. So indeed, either $A$ or $B$ must be singleton. 
