The resonator-induced phase (RIP) gate is a multi-qubit entangling gate that allows a high degree of flexibility in qubit frequencies, making it attractive for quantum operations in large-scale architectures. We experimentally realize the RIP gate with four superconducting qubits in a three-dimensional (3D) circuit-quantum electrodynamics architecture, demonstrating high-fidelity controlled-Z (CZ) gates between all possible pairs of qubits from two different 4-qubit devices in pair subspaces. These qubits are arranged within a wide range of frequency detunings, up to as large as 1.8 GHz. We further show a dynamical multi-qubit refocusing scheme in order to isolate out 2-qubit interactions, and combine them to generate a four-qubit Greenberger-Horne-Zeilinger state.