We investigate the potential of the galaxy power spectrum to constrain compensated isocurvature perturbations (CIPs), primordial fluctuations in the baryon density that are compensated by fluctuations in CDM density to ensure an unperturbed total matter density. We show that CIPs contribute to the galaxy overdensity at linear order, and if they are close to scale-invariant, their effects are nearly perfectly degenerate with the local PNG parameter $f_{rm nl}$ if they correlate with the adiabatic perturbations. This degeneracy can however be broken by analyzing multiple galaxy samples with different bias parameters, or by taking CMB priors on $f_{rm nl}$ into account. Parametrizing the amplitude of the CIP power spectrum as $P_{sigmasigma} = A^2P_{mathcal{R}mathcal{R}}$ (where $P_{mathcal{R}mathcal{R}}$ is the adiabatic power spectrum) we find, for a number of fiducial galaxy samples in a simplified forecast setup, that constraints on $A$, relative to those on $f_{rm nl}$, of order $sigma_{A}/sigma_{f_{rm nl}} approx 1-2$ are achievable for CIPs correlated with adiabatic perturbations, and $sigma_{A}/sigma_{f_{rm nl}} approx 5$ for the uncorrelated case. These values are independent of survey volume, and suggest that current galaxy data are already able to improve significantly on the tightest existing constraints on CIPs from the CMB. Future galaxy surveys that aim to achieve $sigma_{f_{rm nl}} sim 1$ have the potential to place even stronger bounds on CIPs.