It's worth mentioning that there is a general definition of the "congruence subgroup topology" on the automorphism group of a profinite group $\widehat{A}$: namely, the open subgroups of $\text{Aut}(\widehat{A})$ under this topology are generated (as a topology) by the subgroups $$\Gamma[K]: = \ker(\text{Aut}(\widehat{A})\rightarrow\text{Aut}(\widehat{A}/K))$$ as $K$ varies over finite index characteristic subgroups of $\widehat{A}$. You can find this for example in Ribes/Zalesskii's book Profinite Groups $(\S4.4)$. In the same way we also obtain a "congruence subgroup topology" on $\text{Out}(\widehat{A})$.
For a general abstract discrete group $G$, for every abstract group $A$ and a homomorphism $\phi : G\rightarrow\text{Aut}(A)$ (or $\text{Out}(A)$), one obtains the notion of "congruence subgroups" on $G$ (relative to $\phi$), which are by definition those subgroups which contain a preimage of some $\Gamma[K]$ under the map
$$G\stackrel{\phi}{\longrightarrow}\text{Aut}(A)\subset\text{Aut}(\widehat{A}),$$ where the hat denotes profinite completion.
For the modular group $G := \text{SL}_2(\mathbb{Z})$, one can naturally take $A = \mathbb{Z}^2$, and consider the natural homomorphism $$\phi : \text{SL}_2(\mathbb{Z})\rightarrow\text{Aut}(\mathbb{Z}^2)$$ Then, $\text{Aut}(\widehat{\mathbb{Z}^2}) = \text{GL}_2(\widehat{\mathbb{Z}})$, the finite index characteristic subgroups of $\widehat{\mathbb{Z}}^2$ are $K_n := n\widehat{\mathbb{Z}}\times n\widehat{\mathbb{Z}}$, and the preimage of $\Gamma(K_n)$ in $\text{SL}_2(\mathbb{Z})$ is just the classical principal congruence subgroup $\Gamma(n)$.
However, for $G = \text{SL}_2(\mathbb{Z})$, there is another natural choice for $\phi$, given by noting that if $F_2$ denotes the free group of rank 2, then $\text{Out}(F_2)\cong\text{GL}_2(\mathbb{Z})$. From this, one obtains a natural map $$\text{SL}_2(\mathbb{Z})\stackrel{\phi'}{\longrightarrow}\text{Out}(F_2)\subset\text{Out}(\widehat{F_2})$$ The preimages of $\Gamma[K]$ as $K$ varies over finite index characteristic subgroups of $\widehat{F_2}$ then generate the congruence subgroups (relative to $\phi'$) in the sense described above.
The cool thing is that while $\text{SL}_2(\mathbb{Z})$ doesn't have the congruence subgroup property relative to $\phi$, it does relative to $\phi'$. In particular, there are finite index subgroups of $\text{SL}_2(\mathbb{Z})$ which are congruence relative to $\phi'$, but not congruence in the usual sense (ie relative to $\phi$). There is a paper of Bux-Ershov-Rapinchuk which has a nice description of this phenomenon, though the result they prove is originally due to Asada.
In fact, the notion of congruence relative to $\phi$ gives rise to the usual moduli interpretations of "congruence" modular curves, whereas the more general notion of congruence relative to $\phi'$ gives rise to the moduli interpretations for "noncongruence" modular curves.