Understanding the statement "orbifold theories are QFTs with finite gauge group" I'd like to understand the equivalence of orbifold theories in string theory and (2D worldsheet) QFTs with finite gauge group, using the path integral. 
Suppose my action is $$S= \frac{1}{2\pi \alpha'} \int d^2\sigma  (\partial_i X^\mu \partial^i X_\mu)$$ and the $X^\mu(\sigma)$ are invariant under some finite group action $\Gamma$. To construct the orbifold theory on a Riemann surface $\Sigma$, I want to take the path integral over the untwisted and twisted sectors, i.e. I want to average over all boundary conditions on $X^\mu$ in which $X^\mu$ is periodic up to $\Gamma$-action.
Now, on the other hand, if I want to compute the path integral of a QFT with a finite gauge group, I would "gauge-fix" and then compute the path integral. 
How can I see that the two approaches are the same? 
 A: I am not familiar with how to couple to a finite gauge field in the continuum language (i.e., I am not sure how to write down the minimal coupling/covariant derivative). But I can answer your question for lattice gauge theories. Perhaps that is already helpful---and perhaps you can see how to generalize it to a continuum description?
Your question is about a two-dimensional spacetime. So in the context of lattice gauge theories, we can work with a one-dimensional chain. As a concrete example, let us consider the quantum Ising chain:
$$ H = \sum_{n=1}^N \left( X_n X_{n+1} + g \; Z_n \right), $$
where I use $X,Y,Z$ to denote the Pauli matrices. This model has a global $\mathbb Z_2$ symmetry $P = \prod_n Z_n$ and is defined on a Hilbert space $\mathcal H_\textrm{sites}$ consisting of $N$ spin-$1/2$ degrees of freedom. I will now explain how orbifolding this or gauging it lead to the same result.
Orbifolding the Ising chain
Orbifolding corresponds to projecting onto invariant states, as well as summing over boundary conditions:
$$ H_\textrm{orb} = \lambda X_1 X_N + \sum_{n=1}^{N-1} X_n X_{n+1} +  g \sum_{n=1}^N Z_n \qquad \textrm{with constraint } \prod_n Z_n  = 1, $$
where $\lambda = \pm 1$ is a new quantum-mechanical degree of freedom (labeling the periodic/antiperiodic bc's). What I mean by this constraint is that we should think of $H_\textrm{orb}$ being defined on the Hilbert space
$$\mathcal H_\textrm{orb} = \left\{ |\psi\rangle \in \mathcal H_\textrm{sites} \otimes \mathcal H_\textrm{bc} \; \;\left| \; \; \prod_{n=1}^N Z_n |\psi\rangle = |\psi \rangle \right. \right\} ,$$
where $\mathcal H_\textrm{bc}$ denotes the two-level Hilbert space labeled by $\lambda = \pm 1$.
Gauging the Ising chain
Gauging corresponds to coupling it minimally to a $\mathbb Z_2$ gauge field that lives on the links of the original lattice. Let us denote the Pauli matrices on the links as $\sigma^{x,y,z}$. Then:
$$ H_\textrm{gauge} = \sum_{n=1}^N \left( X_n \sigma^z_{n+1/2} X_{n+1} + g \; Z_n \right) \textrm{ with constraint } G_n := \sigma^x_{n-1/2} Z_n \sigma^x_{n+1/2} = 1.$$
The local constraint implements the Gauss law. More precisely, $H_\textrm{gauge}$ is defined on the Hilbert space
$$\mathcal H_\textrm{gauge} = \left\{ |\phi\rangle \in \mathcal H_\textrm{sites} \otimes \mathcal H_\textrm{links}\; \;\left| \; \; \forall n \in \{1,2,\cdots, N\}:G_n |\phi\rangle = |\phi \rangle \right. \right\} .$$
For convenience, I am imagining a periodic system (i.e., no boundaries).
Connecting the two by gauge fixing
Gauge fixing means that we (partially) specify the configuration of the gauge fields; this comes at the price of breaking gauge invariance, but the physical gauge invariant state can always be obtained by gauge-symmetrizing.
Let us make this concrete for, say, the link variable between sites $1$ and $2$. For any gauge-invariant state $|\psi \rangle \in \mathcal H_\textrm{gauge}$, we can project this link variable to point up: $|\psi'\rangle := P^\uparrow_{3/2} |\psi \rangle$ where $P^\uparrow_{n+1/2} := \frac{1 + \sigma^z_{n+1/2}}{2}$ projects a link variable onto $|\uparrow \rangle_{n+1/2}$. This also means that this state is not gauge-invariant, i.e., $|\psi'\rangle \notin \mathcal H_\textrm{gauge}$. Instead, we say it is gauge-fixed. However, no information has been lost: the original state can be recovered by gauge-symmetrizing: $|\psi\rangle = (1+G_2) |\psi'\rangle$. Indeed, this is a simple consequence from $G_2 P_{3/2}^\uparrow = (1-P_{3/2}^\uparrow) G_2$ and the gauge-invariance of $G_2 |\psi\rangle = |\psi\rangle$.
As an aside, one can actually derive the normalization of $|\psi'\rangle$:
$$ \scriptsize \langle \psi' |\psi' \rangle = \langle \psi | P^\uparrow_{3/2} | \psi \rangle = \langle \psi | G_2 P^\uparrow_{3/2}  | \psi \rangle = \langle \psi | \left( 1- P^\uparrow_{3/2}  \right) G_n | \psi \rangle = \langle \psi | \psi\rangle - \langle \psi' |\psi' \rangle \quad \Rightarrow \quad \langle \psi' |\psi' \rangle  = \frac{1}{2} \langle \psi | \psi\rangle.$$
One can similarly project the link variable between sites $2$ and $3$, which can be undone using $(1+G_3)$, and one can keep doing this all the way to the link between sites $N-1$ and $N$ (using $G_N$), obtaining the gauge-fixed state:
$$ |\psi_\textrm{fix}\rangle = \sqrt{2}^{N-1} \prod_{n=1}^{N-1} P^\uparrow_{n+1/2} |\psi\rangle \quad \Leftrightarrow \quad |\psi\rangle = \frac{1}{\sqrt{2}^{N-1}} \prod_{n=2}^N (1+G_n) |\psi_\textrm{fix} \rangle$$
The gauge-fixed wavefunction has almost all link variables being polarized into a product state, except for the link between sites $N$ and $1$ (let us denote this link as $N+1/2 = 1/2$). Indeed, if we would apply the projector $P_{1/2}^\uparrow$, we would lose information since we can no longer argue that $(1+G_1)$ would undo this projection: it acts non-trivially only the link between sites $1$ and $2$, which would screw up our earlier argument that we can undo that projection $P_{3/2}$ et cetera.
The gauge-fixed wavefunction thus has one link variable left. The effective Hamiltonian on this gauge-fixed wavefunction looks like
$$ H_\textrm{fix} = \sum_{n=1}^{N-1}  X_n X_{n+1} + X_N \sigma^z_{1/2} X_1 + g \sum_{n=1}^N Z_n. $$
This looks exactly like our orbifold Hamiltonian, $H_\textrm{orb}$! Indeed, if we simply omit the polarized link variables in our description, we see that our Hilbert space of gauge-fixed states is simply $\mathcal H_\textrm{orb}$ if we identify $\lambda = \sigma^z_{1/2}$. To fact that our gauge-fixed states satisfy $\prod_n Z_n = +1$ follows from the fact that the original state obeys this (since  $\prod_n Z_n = \prod_n G_n$) and our projectors commute with $\prod_n Z_n$. Conversely, we can see that any state of this orbifold space gives a gauge-invariant state after acting with $\prod_{n=2}^N (1+G_n)$: by construction this state is invariant under $G_{n=2,\cdots,N}$, as for $G_1$ simply observe that $G_1 = \prod_{n=2}^N G_n \times \prod_{n=1}^N Z_n$.
