We develop a theory for the interaction of multi-level atoms with multi-mode cavities yielding cavity-enhanced multi-photon resonances. The locations of the resonances are predicted from the use of effective two- and three-level Hamiltonians. As an application we show that quantum gates can be realised when photonic qubits are encoded on the cavity modes in arrangements where ancilla atoms transit the cavity. The fidelity of operations is increased by conditional measurements on the atom and by the use of a selected, dual-rail, Hilbert space. A universal set of gates is proposed, including the Fredkin gate and iSWAP operation; the system seems promising for scalability.