The point is not that every element of $G'$ is an element of $U$; this is false, as noted in the comments. In general if $G$ is a group and $U$ is a subset, the "smallest subgroup of $G$ containing $U$" need not be equal to $U$.
The point instead is that the set $U$ is preserved by every automorphism $T$, in other words $T(U)=U$. For instance to prove that $T(U) \subset U$, take an element of $T(U)$ of the form $T(g)$ where $g = x y x^{-1} y^{-1} \in U$. Then $T(g) = T(x y x^{-1} y^{-1}) = T(x) T(y) T(x)^{-1} T(y)^{-1} \in U$. The reverse inclusion $U \subset T(U)$ is equivalent to $T^{-1}(U) \subset U$ which is proved similarly.
To say that $G'$ is the smallest subgroup of $G$ containing $U$ means that $G'$ is the intersection of all subgroups of $G$ containing $U$. From this it follows that $T(G')$ is the intersection of all subgroups of $G$ containing $T(U)$, i.e. $T(G')$ is the smallest subgroup of $G$ containing $T(U)$. To see why this is true, notice that like any permutation of any set, the automorphism $T$ also permutes the set of subsets of $G$. The latter permutation preserves the inclusion relation and the intersection operation: for any subsets $A \subset B$ of $G$ we have $T(A) \subset T(B)$; and for any collection of subsets $\{A_i\}$ we have $T\bigl( \cap_i A_i \bigr) = \cap_i T(A_i)$. Also, because $T$ is a group automorphism, a subset $A \subset G$ is a subgroup if and only if $T(A) \subset G$ is a subgroup. Since $G'$ is the intersection of all subgroups that contain $U$, it follows that $T(G')$ is the intersection of all subgroups that contain $T(U)$.
Since $T(U)=U$, it follows that $T(G')$ is the smallest subgroup of $G$ containing $U$, and so $T(G')=G'$.