Algebraicity of the canonical projection $X(\Gamma)\to X(1)$ and of $X(\Gamma)$ Let $\Gamma\subset {SL}_2(\mathbb Z)$ be a congruence subgroup, and let $X(\Gamma)$ be the associated compact modular curve. The inclusion $\Gamma \subset SL_2(\mathbb Z)$ induces a canonical projection $p:X(\Gamma)\to X(1)$ which is a non-constant holomorphic map of compact Riemann surfaces, where $X(1)=X(SL_2(\mathbb Z))$. The map $p$ ramifies at most over the elliptic points $i=\sqrt{-1}$ and $\mu_3=e^{2\pi i/3}$ of $X(1)$ and over the cusp $\infty$ of $X(1)$. Let $d$ be the degree of $p$ and let $\overline{\mathbb Q}$ be an algebraic closure of $\mathbb Q$.
Assumption $(*)$: There exists a smooth, projective and connected curve 
$X(\Gamma)_{\overline{\mathbb Q}}$ over $\overline{\mathbb Q}$ such that its  base change to $\mathbb C$ corresponds to $X(\Gamma)$. 


*

*If assumption $(*)$ is satisfied, does there exists a non-constant morphism $X(\Gamma)_{\overline{\mathbb Q}}\to \mathbb P^1$ of algebraic curves over $\bar{\mathbb Q}$ of degree $d$, which ramifies at most over $i$, $\mu_3$ and $\infty$ (viewed as points of $\mathbb P^1=X(1)_{\overline{\mathbb Q}}$)? 

*Is assumption $(*)$ always satisfied?
 A: Let $X(\Gamma)\to \mathbf{P}^1_{\mathbf C}$ be the composition of the natural map $X(\Gamma)\to X(1)$ associated to the inclusion $\Gamma\subset$ SL$_2(\mathbf Z)$, and the $j$-invariant $j:X(1)\to \mathbf{P}^1_{\mathbf C}$. This map is, as you said, ramified over at most three points. Since these three points are algebraic numbers, by a theorem of Grothendieck and Weil, there exists a unique pair $(Y,Y\to \mathbf{P}^1_{\overline{\mathbf Q}})$ with $Y$ a smooth projective connected curve over $\overline{\mathbf Q}$ and $Y\to \mathbf{P}^1_{\overline{\mathbf Q}}$ a finite morphism which gives the natural map $X(\Gamma)\to \mathbf{P}^1_{\mathbf C}$ after base-change. If you just want a model for your $X(\Gamma)$ over $\overline {\mathbf Q}$ as a curve (and not as a cover) you have more choice. 
The theorem of Grothendieck and Weil is more general. Let $k\subset K$ be an extension of algebraically closed fields of characteristic zero. Then, for any smooth quasi-projective connected variety $U$  over $k$, the base-change functor is an equivalence of categories from "finite etale covers of $U$" to "finite etale covers of $U_K$". We are applying this theorem to $\mathbf P^1_{k} -\{0,1,\infty\}$ with $k=\overline {\mathbf Q}$ and $K=\mathbf C$. 
