Yes. Let $E$ be the ground set of a matroid. Define an equivalence relation $\sim$ on $E$ by imposing that $i \sim j$ if $i$ and $j$ are in the same circuit of $E$, and taking the transitive closure of this. Then the equivalence classes of $\sim$ are the connected components of the matroid.

Any circuit of $M|_A$ is also a circuit of $M$, so if two elements of $A$ are in the same connected component of $M|_A$ then they are in the same connected component of $M$. (The converse is not true.)

Let $x$ be in $A \cap B$. For any $a \in A$, since $A$ is connected, we have that $a$ is in the same connected component of $M|_A$ as $x$ is. By the observation of the previous paragraph, this means that $a$ and $x$ are in the same connected component of $M$. Similarly, every $b \in B$ is in the same connected component of $M$ as $x$ is. So all of $M$ is one connected component.