If you know the change of the (vector) basis, the answer is straightforward.
If you don't know the change of the (vector) basis, but only want some particular representation for the gamma matrices (for instance you want only real matrices, or only imaginary matrices), you may try for $S$ :
$$S=\frac{1}{\sqrt{2}} \begin{pmatrix} A&B\\-\epsilon B&\epsilon A \end{pmatrix}, S^{-1}=\frac{1}{\sqrt{2}}\begin{pmatrix} A&-\epsilon B\\ B&\epsilon A \end{pmatrix}$$
where $\epsilon = \pm1$, $A, B$ are $2*2$ matrices, such as $A^2= B^2=1$, and $[A, B]=0$.
For instance, you may take one of the matrix equals to $\pm \mathbb{Id}$, and the other being a Pauli matrix $\pm \sigma_i$.
For obtaining Majorana representation from Dirac representation, we may use : $\epsilon = -1, A = \mathbb{Id}, B = \sigma_y$
One option is to start out with the matrix representation for two sets of conjugate Grassmann numbers (see previous thread), $\theta_i, \pi_i$ with $i=1,...,N$, such that
$\{\theta_i,\theta_j\}=0,\quad\{\pi_{i},\pi_{j}\} = 0, \quad \{\theta_i,\pi_j\} = \delta_{ij}$
Then a $2N$-dimensional Clifford algebra can be built by
$\gamma_{i}=\theta_{i}+\pi_{i}\\
\gamma_{N+i}=i(\theta_{i}-\pi_{i})$
Given the above anti-commutation relations it is straightforward to verify that $\{\gamma_{i},\gamma_{j}\}=2\delta_{ij}\mathbf{1}$. For a odd number of dimensions the last $\gamma$-matrix can be found by considering the product
$\gamma_{2N+1} = i^N\prod_{i=1}^{2N}\gamma_{i} = i^N\gamma_{1}\gamma_2...\gamma_{2N}$
To get a representation of the Dirac algebra $\{\gamma_{\mu},\gamma_\nu\}=2g_{\mu\nu}\mathbf{1}$ with signature (+,-,-,...,-) simply rotate all but one of the matrices in the representation such that $\gamma_i\to i\gamma_i$ (and relabel a bit).
This approach enables one to derive general representations of the gamma matrices from Grassmann numbers.
However, another option exists, namely to start out with a lower dimensional representation of the Clifford algebra (which can be computed by the method described above). A well-known case of a lower-dimensional representation, which was also known to Weyl & Dirac, would be the Pauli matrices:
$\sigma_{1} = \left[\begin{matrix}
0 & 1 \\
1 & 0
\end{matrix}\right], \quad
\sigma_{2} = \left[\begin{matrix}
0 & -i \\
i & 0
\end{matrix}\right], \quad
\sigma_{3} = \left[\begin{matrix}
1 & 0 \\
0 & -1
\end{matrix}\right] $
From these matrices outer products, $\rho_i = \mathbf{1}\otimes \sigma_i$ and $\eta_i = \sigma_i \otimes \mathbf{1}$, can be formed. It is then clear that $[\rho_i,\eta_j]=0$ which makes it possible to choose five matrices from the set $\{\rho_i,\eta_j,\rho_i\eta_j\}$ which fulfill the Clifford algebra.
To make this approach a bit more explicit, consider starting with a diagonal matrix from the initial set for simplicity - let us choose $\rho_3$ ($\eta_3$ would have been another option). This leaves us with two potential sets of matrices, namely $\{\rho_1,\rho_2\eta_1,\rho_2\eta_2,\rho_2\eta_3\}$ and $\{\rho_{2},\rho_{1}\eta_{1},\rho_{1}\eta_{2},\rho_{1}\eta_{3}\}$. Since $\rho_1$ is real I choose the first set, making the matrices:
\begin{align}
\gamma_0 &= \left[\begin{matrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & -1 & 0 \\
0 & 0 & 0 & -1
\end{matrix}\right] = \rho_3,
&&\gamma_1 = \left[\begin{matrix}
0 & 0 & 0 & 1 \\
0 & 0 & 1 & 0 \\
0 & -1 & 0 & 0 \\
-1 & 0 & 0 & 0
\end{matrix}\right] = i\rho_2\eta_1 \\
\gamma_2 &= \left[\begin{matrix}
0 & 0 & 0 & -i \\
0 & 0 & i & 0 \\
0 & i & 0 & 0 \\
-i & 0 & 0 & 0
\end{matrix}\right] = i\rho_2\eta_2,
&&\gamma_3 = \left[\begin{matrix}
0 & 0 & 1 & 0 \\
0 & 0 & 0 & -1 \\
-1 & 0 & 0 & 0 \\
0 & -1 & 0 & 0
\end{matrix}\right] = i\rho_2\eta_3\\
\gamma_5 &= \left[\begin{matrix}
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0
\end{matrix}\right] = \rho_1
\end{align}
where I have taken the liberty to rotate three of them as described above. In this way the Dirac representation is found. Notice that a few choices were made along the way but that several of them can be motivated by the search for a simple representation (choosing diagonal and/or real when possible).
This approach can naturally be generalized to generate higher dimensional representations as well.
Best Answer
Try (A-26) of Itzykson & Zuber, or any decent QFT text. $$ T= \frac {1}{\sqrt 2} (I\otimes I + i\sigma^2\otimes I), $$ which leaves $$ \vec{\gamma}= i\sigma^2\otimes \vec{\sigma} $$ invariant under a similarity transformation and maps $\gamma^0$: $$ T\gamma_D^0T^{-1}=\frac {1}{\sqrt 2} (I\otimes I + i\sigma^2\otimes I) (\sigma^3\otimes I ) \frac {1}{\sqrt 2} (I\otimes I - i\sigma^2\otimes I) = -\sigma^1\otimes I=\gamma_W^0 ~. $$ The roles of $\sigma ^1$ and $\sigma^3$ are essentially reversed between the W and D representations for $\gamma^5$ , so the inverse T here transforms $\gamma^5$, and the above equation alternatively amounts to $$ T\gamma_D^5 T^{-1}=\frac {1}{\sqrt 2} (I\otimes I + i\sigma^2\otimes I) (\sigma^1\otimes I ) \frac {1}{\sqrt 2} (I\otimes I - i\sigma^2\otimes I) = \sigma^3\otimes I=\gamma_W^5 ~. $$