I have a gamma distributed random variable $X$, with its mean $\mu$ distributed as some other function $$ X \sim \text{Gamma}(\mu,k)\\ \mu \sim P(\theta) $$
What is the distribution $P(\theta)$ such that when I marginalize out $\mu$, $X$ is still distributed as a gamma distribution, perhaps with updated parameters?
$$ p(x|k,\theta)=\int_0^{\infty} d\mu\, p(x|\mu,k)p(\mu|\theta) $$ i.e. $p(x|k,\theta)=\frac{x^{\kappa-1}e^{- x\kappa/\phi}}{(\phi/\kappa)^{\kappa}\Gamma(\kappa)}$ where $\phi,\kappa$ are functions of $k,\theta$
If the scale parameter $k$ is known then it is still Gamma distribution. For details and more general case take a look at the conjugate prior tables here.