A new family of superconductors containing layers of iron arsenide has attracted considerable interest because of their high transition temperatures (T(c)), some of which are >50 K, and because of similarities with the high-T(c) copper oxide superconductors. In both the iron arsenides and the copper oxides, superconductivity arises when an antiferromagnetically ordered phase has been suppressed by chemical doping. A universal feature of the copper oxide superconductors is the existence of a resonant magnetic excitation, localized in both energy and wavevector, within the superconducting phase. This resonance, which has also been observed in several heavy-fermion superconductors, is predicted to occur when the sign of the superconducting energy gap takes opposite values on different parts of the Fermi surface, an unusual gap symmetry which implies that the electron pairing interaction is repulsive at short range. Angle-resolved photoelectron spectroscopy shows no evidence of gap anisotropy in the iron arsenides, but such measurements are insensitive to the phase of the gap on separate parts of the Fermi surface. Here we report inelastic neutron scattering observations of a magnetic resonance below T(c) in Ba(0.6)K(0.4)Fe(2)As(2), a phase-sensitive measurement demonstrating that the superconducting energy gap has unconventional symmetry in the iron arsenide superconductors.