The detection of X-ray emission from Ap stars can be an indicator for the presence of magnetic activity and dynamo action, provided different origins for the emission, such as wind shocks and close late-type companions, can be excluded. Here we report on results for gamma Equu, the only roAp star for which an X-ray detection is reported in ROSAT catalogs. We use high resolution imaging in X-rays with Chandra and in the near-infrared with NACO/VLT that allow us to spatially resolve companions down to ~1 and ~0.06 separations, respectively. The bulk of the X-ray emission is associated with a companion of gamma Equu identified in our NACO image. Assuming coevality with the primary roAp star (~900 Myr), the available photometry for the companion points at a K-type star with ~0.6 M_sun. Its X-ray properties are in agreement with the predictions for its age and mass. An excess of photons with respect to the expected background and contribution from the nearby companion is observed near the optical position of gamma Equu. We estimate an X-ray luminosity of log L_x [erg/s] = 26.6 and log(L_x/L_bol) = -7.9 for this emission. A small offset between the optical and the X-ray image leaves some doubt on its association with the roAp star. The faint X-ray emission that we tentatively ascribe to the roAp star is difficult to explain as a solar-like stellar corona due to its very low L_x/L_bol level and the very long rotation period of gamma Equu. It could be produced in magnetically confined wind shocks implying a mass loss rate of ~10^(-14) M_sun/yr or from an additional unknown late-type companion at separation ~0.4. If confirmed by future deeper X-ray observations this emission could point at the origin for the presence of radioactive elements on some roAp stars.