Implementing Gaussian random variable by using a uniform random variable
Your initial algorithm creates a random variable that's uniformly distributed between 0 and 1. The variance of that is 1/12. If you sum NUM_GAUSSIAN_SUMS instances of that the variance will be NUM_GAUSSIAN_SUMS/12. In order to get to a target variance, V, you need to multiply the summed random variable with sqrt(V*12/NUM_GAUSSIAN_SUMS).

As a side note, a template will work reasonable well for floats and doubles but there will be significant numerical problems with any fixed point type.