  Using high-resolution SPH numerical simulations, we investigate the effects
of gas on the inspiral and merger of a massive black hole binary. This study is
motivated by both observational and theoretical work that indicate the presence
of large amounts of gas in the central regions of merging galaxies. N-body
simulations have shown that the coalescence of a massive black hole binary
eventually stalls in a stellar background. However, our simulations suggest
that the massive black hole binary will finally merge if it is embedded in a
gaseous background. Here we present results in which the gas is assumed to be
initially spherical with a relatively smooth distribution. In the early
evolution of the binary, the separation dimishes due to the gravitational drag
exerted by the background gas. In the later stages, when the binary dominates
the gravitational potential in its vicinity, the medium responds by forming an
ellipsoidal density enhancement whose axis lags behind the binary axis, and
this offset produces a torque on the binary that causes continuing loss of
angular momentum and is able to reduce the binary separation to distances where
gravitational radiation is efficient. Assuming typical parameters from
observations of Ultra Luminous Infrared Galaxies, we predict that a black hole
binary will merge within $10^{7}$yrs; therefore these results imply that in a
merger of gas-rich galaxies, any massive central black holes will coalescence
soon after the galaxies merge. Our work thus supports scenarios of massive
black hole evolution and growth where hierarchical merging plays an important
role. The final coalescence of the black holes leads to gravitational radiation
emission that would be detectable up to high redshift by LISA. We show that
similar physical effects are important for the formation of close binary stars.
