No, you cannot marginalize the prior and then multiply the marginal with g(x). Here is why:
The correct way to use Bayes theorem is to do the following (also suggested by John):
$g_p(x,y,z) \propto g(x,y,z) k(x,y,z)$$g_{p1}(x,y,z) \propto g(x,y,z) k(x,y,z)$
Thus,
$g_p(x) \propto \int_{y,z} \bigl(g(x,y,z) k(x,y,z) \bigr)$$g_{p1}(x) \propto \int_{y,z} \bigl(g(x,y,z) k(x,y,z) \bigr)$
Your want to do the following:
$g_p^'(x) \propto \int_{y,z} \bigl(g(x,y,z) \bigr) \int_{y,z} \bigl(k(x,y,z) \bigr)$$g_{p2}(x) \propto \int_{y,z} \bigl(g(x,y,z) \bigr) \int_{y,z} \bigl(k(x,y,z) \bigr)$
In general, $g_p(x)$$g_{p1}(x)$ and $g_p^'(x)$$g_{p2}(x)$ will not be identical.