The formation of gaseous giant planets is thought to occur in the first few million years after stellar birth. Models(1) predict that the process produces a deep gap in the dust component (shallower in the gas(2-4)). Infrared observations of the disk around the young star HD 142527 (at a distance of about 140 parsecs from Earth) found an inner disk about 10 astronomical units (AU) in radius(5) (1 AU is the Earth-Sun distance), surrounded by a particularly large gap(6) and a disrupted(7) outer disk beyond 140 AU. This disruption is indicative of a perturbing planetary-mass body at about 90 AU. Radio observations(8,9) indicate that the bulk mass is molecular and lies in the outer disk, whose continuum emission has a horseshoe morphology(8). The high stellar accretion rate(10) would deplete the inner disk(11) in less than one year, and to sustain the observed accretion matter must therefore flow from the outer disk and cross the gap. In dynamical models, the putative protoplanets channel outer-disk material into gap-crossing bridges that feed stellar accretion through the inner disk(12). Here we report observations of diffuse CO gas inside the gap, with denser HCO+ gas along gap-crossing filaments. The estimated flow rate of the gas is in the range of 7 x 10(-9) to 2 x 10(-7) solar masses per year, which is sufficient to maintain accretion onto the star at the present rate.