We study the ground state of a bilayer system of dipolar bosons with dipoles oriented by an external field perpendicularly to the two parallel planes. By decreasing the interlayer distance, for a fixed value of the strength of the dipolar interaction, the system undergoes a quantum phase transition from an atomic to a pair superfluid. We investigate the excitation spectrum across this transition by using microscopic approaches. Quantum Monte Carlo methods are employed to obtain the static structure factors and intermediate scattering functions in imaginary time. The dynamic response is calculated using both the correlated basis functions (CBF) method and the approximate inversion of the Laplace transform of the quantum Monte Carlo imaginary time data. In the atomic phase, both density and spin excitations are gapless. However, in the pair-superfluid phase a gap opens in the excitation energy of the spin mode. For small separation between layers, the minimal spin excitation energy equals the binding energy of a dimer and is twice the gap value.