When evaluating a definite integral by integrating by parts is the following allowed? $$= \int_a^b f(x)g(x) \, dx  =  \int_a^b f(x)\, dx\cdot [g(x)]_a^b\, -\int_a^b \bigg[ g'(x) (\int f(x)dx\bigg] \, dx  $$
$$ = C - \int_a^b \Bigg[g'(x)\cdot\int_a^b f(x)dx\, \Bigg]dx  \, $$
where C is the value of the first term.
I am asking if I can put the limits on the integral of f(x).
Is this allowed?
I am working on a problem where $\int_a^b g(x)dx\ $ is the gaussian integral so if this is legal I could just take $ \sqrt{\pi}$ outside of the integral which would ease my task.

No.
If $F'(x) = f(x)$ for all $x \in [a,b]$ then IBP (regarding $g(x)$ as the thing to be differentiated and $f(x)$ the thing to be antidifferentiated) says:
\begin{align*}
\int_a^b f(x) g(x) \, dx & = \left[g(x) F(x)\right] \Big \vert_a^b - \int_a^b F(x) g'(x) \, dx \\
& = (g(b) F(b) - g(a) F(a)) - \int_a^b F(x) g'(x) \, dx.
\end{align*}
Note that an antiderivative $F$ of $f$, which is a function (not generally a number), is involved in this formula.  In particular, the first term on the extreme right hand side is $g(b) F(b) - g(a) F(a)$, and not $\left(\int_a^b f(x) \, dx \right) \cdot \left (g(x)\Big \vert_a^b \right)= (F(b) - F(a)) (g(b) - g(a))$, and the integral on the extreme right hand side involves the function $F(x)$, and not the number $\int_a^b f(x) \, dx = F(b) - F(a)$.
See a related question here: For valid probability densities $p(x)$ and $q(x), \int p(x)\ln(q(x))~dx = 0$. Can you catch my mistake?. There the fallacy was similar: integration by parts requires an antiderivative of a function, not just one single definite integral involving that function.  (Their $p(x)$ is playing a role analogous to $f(x)$ here.)
