Here are multiple equivalent definition of irreducible. I will use following definition:
A topological space $X$ is said to be irreducible if every pair of non empty open sets in $X$ intersect.
Clearly, this definition is equivalent to the decomposition, just take complement in $X$. We want to show $\overline{Y}$ is irreducible. Let $\overline{Y}\cap U_i\neq \emptyset$ be open set in subspace topology $\overline{Y}$, $i=1,2$. By equivalent definition of closure, $Y\cap U_i\neq \emptyset$. Since $Y$ is irreducible, we have $Y\cap U_i$’s intersect. Thus $\overline{Y}\cap U_i$’s intersect because $Y\cap U_i\subseteq \overline{Y}\cap U_i$. Hence $\overline{Y}$ is irreducible.