I agree with @Simona99's answer. If you want to formulate it in terms of a quantum channel, consider the quantum channel $\mathcal{E}[\rho] = \sum_i \Pi_i \rho \Pi_i$ that corresponds to a measurement of an observable of the form $O = \sum_i \lambda_i \Pi_i$ with orthogonal projectors $\Pi_i$ and real, distinct eigenvalues $\lambda_i \neq \lambda_j$. Further consider the unitary channel $\mathcal{F}[\rho] = G \rho G^\dagger$ that applies the unitary gate $G$. It is easy to see that, whenever $[G, \Pi_i] = 0 \, \forall i$, then also the two channels commute.
Because the Kraus operators of the measurement channel are orthogonal projectors, it is also a necessary condition. If we start with $[G, O] = 0$, there exists a common eigenbasis of $G$ and $O$. As the $\Pi_i$ project onto a certain eigensubspace of $O$, they also decompose into common eigenvectors, i.e. $[G, \Pi_i] = 0 \, \forall i$.
What the channel does not capture is whether the measurement outcome is also conserved, but this can be straight forwardly checked: ${\rm Tr}(G\rho G^\dagger O) = {\rm Tr}(\rho O)$, if $[G,O]=0$.