  We report the discovery of rising X-ray emission from the binary neutron star
(BNS) merger event GW170817. This is the first detection of X-ray emission from
a gravitational-wave source. Observations acquired with the Chandra X-ray
Observatory (CXO) at t~2.3 days post merger reveal no significant emission,
with L_x<=3.2x10^38 erg/s (isotropic-equivalent). Continued monitoring revealed
the presence of an X-ray source that brightened with time, reaching L_x\sim
9x10^39 erg/s at ~15.1 days post merger. We interpret these findings in the
context of isotropic and collimated relativistic outflows (both on- and
off-axis). We find that the broad-band X-ray to radio observations are
consistent with emission from a relativistic jet with kinetic energy
E_k~10^49-10^50 erg, viewed off-axis with theta_obs~ 20-40 deg. Our models
favor a circumbinary density n~ 0.0001-0.01 cm-3, depending on the value of the
microphysical parameter epsilon_B=10^{-4}-10^{-2}. A central-engine origin of
the X-ray emission is unlikely. Future X-ray observations at $t\gtrsim 100$
days, when the target will be observable again with the CXO, will provide
additional constraints to solve the model degeneracies and test our
predictions. Our inferences on theta_obs are testable with gravitational wave
information on GW170817 from Advanced LIGO/Virgo on the binary inclination.
