Hard connected instances for Weisfeiler-Lehman test of isomorphism
Yes, there are non-isomorphic connected graphs that cannot be distinguished by Weisfeiler&ndash;Lehman.  The following construction is due to Cai, F&uuml;rer and Immerman (An Optimal Lower Bound on the Number of Variables for Graph Identification, Combinatorica 12(4):389&ndash;410, 1992; PDF).

Take any connected, $3$-regular graph $G=(V,E)$. We will produce non-isomorphic graphs $G_\parallel$ and $G_\times$ from&nbsp;$G$, that are indistinguishable by Weisfeiler&ndash;Lehman.  These will be made by producing a gadget for each vertex of&nbsp;$G$ and, for each edge $xy\in E$, connecting the gadgets for $x$ and&nbsp;$y$ by a pair of parallel edges.

The vertices of $G_\parallel$ are is defined as follows.


For each $xy\in E$, we create four (distinct) vertices, $a_{x,y}$, $a_{y,x}$, $b_{x,y}$ and $b_{y,x}$.
For each $x\in V$, we create a vertex&nbsp;$c_{x,S}$ for each odd-cardinality subset of $\Gamma(x)$ (the neighbours of&nbsp;$x$ in&nbsp;$G$).  So, if $x$'s neighbours are $u$, $v$ and&nbsp;$w$, we create vertices $c_{x,\{u\}}$, $c_{x,\{v\}}$, $c_{x,\{w\}}$ and $c_{x,\{u,v,w\}}$.


The edges of $G_\parallel$ are defined as follows.  For each edge $xy\in E$, we add:


the two edges $a_{x,y}a_{y,x}$ and $b_{x,y}b_{y,x}$;
the edges $a_{x,y}c_{x,S}$ for each&nbsp;$S$ such that $y\in S$;
the edges $b_{x,y}c_{x,S}$ for each&nbsp;$S$ such that $y\notin S$.


Note that $G$&nbsp;is undirected so if $xy\in E$, then $yx\in E$ also, and we follow the above rules twice for each edge of&nbsp;$G$.

Now, let $xy$ be any edge in&nbsp;$G$ and let $G_{xy}$ be the graph made from $G_\parallel$ by deleting the edges $a_{x,y}a_{y,x}$ and $b_{x,y}b_{y,x}$ and replacing them with the "cross" edges $a_{x,y}b_{y,x}$ and $b_{x,y}a_{y,x}$.  The following lemma is the key point of the construction.

Lemma 1. For any edges $uv,xy\in E$, the graphs $G_{uv}$ and $G_{xy}$ are isomorphic.

Proof sketch. You can move the cross edge around the graph in the following sense.  For any pair of edges $ij,jk\in E$, there's an isomorphism of $G_{ij}$ that exchanges $a_{j,i}$ and&nbsp;$b_{j,i}$ and exchanges $a_{j,k}$ and&nbsp;$b_{j,k}$. This isomorphism is a permutation of the vertices $c_{j,S}$, and it fixes every other vertex in $G_{ij}$.  If you draw the fragment of the graph corresponding to vertex&nbsp;$j$ and its incident edges, the isomorphism should be pretty obvious.

This means that $G_{ij}\simeq G_{jk}$, because the isomorphism "uncrosses" the edge&nbsp;$ij$ and "crosses" the edge&nbsp;$jk$.  Since $G$&nbsp;is connected, it contains a path whose first edge is&nbsp;$uv$ and whose last edge is&nbsp;$xy$, and we can use the isomorphisms corresponding to each adjacent pair of edges in this path to move the cross in&nbsp;$G_{uv}$ to&nbsp;$xy$.&nbsp;$\Box$

By Lemma&nbsp;1, we're entitled to use the name&nbsp;$G_\times$ for an arbitrary graph $G_{xy}$.  We now have the graphs $G_\parallel$ and $G_\times$; it remains to show that they're non-isomorphic and that they're indistinguishable to Weisfeiler&ndash;Lehman.

Lemma 2. For any connected, 3-regular graph&nbsp;$G$, we have $G_\parallel \not\simeq G_\times$.

Proof sketch. It turns out that the only isomorphisms of $G_\parallel$ and $G_\times$ are isomorphisms induced by isomorphisms of&nbsp;$G$, and isomorphisms of the form used in the proof of Lemma&nbsp;1.  But no such isomorphism can transform $G_\times$ into&nbsp;$G_\parallel$ because $G_\times$&nbsp;has a cross edge and $G_\parallel$ does not.&nbsp;$\Box$

Now, indistinguishability.  Weisfeiler&ndash;Lehman is definable in so-called "fixed-point logic with counting."  This is first-order logic plus:


counting quantifiers: for each natural number&nbsp;$n$, you can write $\exists^{\geq n}x\,\varphi(x)$, meaning "There exist at least&nbsp;$n$ values of&nbsp;$x$ that satisfy&nbsp;$\varphi$." This can already be expressed in ordinary first-order logic, just by saying that there exist distinct $x_1, \dots, x_n$ that all satisfy&nbsp;$\varphi$, but the (rather subtle) point here is that the counting quantifier only uses just one variable, whereas the "pure" first-order expression uses $n$&nbsp;distinct variables.
inductive definitions. These let you build up a relation&nbsp;$R$ as follows.  You start with $R=\emptyset$. Then, you add to&nbsp;$R$ all the tuples that satisfy a formula&nbsp;$\varphi$, and keep doing that until you run out of tuples to add.  $\varphi$&nbsp;itself can depend on&nbsp;$R$, so you can build up some interesting things.


In particular, you can build up an equivalence relation corresponding to the colour-classes of Weisfeiler&ndash;Lehman. The counting quantifiers let you talk about the numbe of neighbours of each colour, and the inductive definitions let you recursively refine the colouring based on the number of neighbours of each colour in the previous step.

A separator of a graph $G=(V,E)$ is a set $S\subseteq V$ such that no component of $G-S$ has more than $|V|/2$ vertices. In the following, I say "less than about&nbsp;$2k$" because I'm silently translating from fixed-point logic with counting to so-called "infinitary logic with counting", which roughly doubles the number of variables. I don't remember the exact details, and it's not important enough to hunt them down.

Theorem 3. Let $\varphi$ be a formula of fixed-point logic with counting, using $k$&nbsp;distinct variables.  If $G$&nbsp;is a graph with no separator of size less than about&nbsp;$2k$, then $\varphi$&nbsp;cannot distinguish $G_\parallel$ from&nbsp;$G_\times$.

Proof sketch. Very roughly speaking, while you're evaluating the formula&nbsp;$\varphi$ on $G_\parallel$ or&nbsp;$G_\times$, you might need to consider $k$&nbsp;vertices as being the value of some variables at the current iteration of an inductive construction and $k$&nbsp;more variables as being the value of the variables at the previous iteration. The fact that $G$&nbsp;has no small separators means that, even if we fix those vertices, we can still move the cross around in a large component of the rest of the graph, without the formula "knowing" that we've done that, so the formula can never "see" the cross, so it can never tell the difference between the graph with the cross and the graph without it.&nbsp;$\Box$

For any fixed&nbsp;$d$, $d$-dimensional Weisfeiler&ndash;Lehman can be expressed as a formula of fixed-point logic with counting, using some number&nbsp;$k$ of variables ($k\approx 2d$ is enough, as I recall). Since that formula can't tell the difference between the non-isomorphic graphs $G_\parallel$ and&nbsp;$G_\times$ as long as $G$&nbsp;has no small separators, nor can Weisfeiler&ndash;Lehman.

Guess who got a PhD doing this kind of stuff...