Invariance under the charge, parity, time-reversal (CPT) transformation is one of the fundamental symmetries of the standard model of particle physics. This CPT invariance implies that the fundamental properties of antiparticles and their matter-conjugates are identical, apart from signs. There is a deep link between CPT invariance and Lorentz symmetry--that is, the laws of nature seem to be invariant under the symmetry transformation of spacetime--although it is model dependent. A number of high-precision CPT and Lorentz invariance tests--using a co-magnetometer, a torsion pendulum and a maser, among others--have been performed, but only a few direct high-precision CPT tests that compare the fundamental properties of matter and antimatter are available. Here we report high-precision cyclotron frequency comparisons of a single antiproton and a negatively charged hydrogen ion (H(-)) carried out in a Penning trap system. From 13,000 frequency measurements we compare the charge-to-mass ratio for the antiproton (q/m)p- to that for the proton (q/m)p and obtain (q/m)p-/(q/m)p − 1 =1(69) × 10(-12). The measurements were performed at cyclotron frequencies of 29.6 megahertz, so our result shows that the CPT theorem holds at the atto-electronvolt scale. Our precision of 69 parts per trillion exceeds the energy resolution of previous antiproton-to-proton mass comparisons as well as the respective figure of merit of the standard model extension by a factor of four. In addition, we give a limit on sidereal variations in the measured ratio of <720 parts per trillion. By following the arguments of ref. 11, our result can be interpreted as a stringent test of the weak equivalence principle of general relativity using baryonic antimatter, and it sets a new limit on the gravitational anomaly parameter of |α − 1| < 8.7 × 10(-7).