According to the list of Pokemon in the Battle Maison on Bulbapedia, this can happen.
Your miss was caused by the Gastly's held item, the Lax Incense. This item can cause accuracy drops. It's not much you can do in terms of preventative measures, but here's your cause. You could run Hone Claws, but given you already have Truant I don't know how useful that would be.