We present a dynamical second-order kernel for the Bethe-Salpeter equation to calculate electronic excitation energies. The derivation takes explicitly the functional derivative of the exact second-order self energy with respect to the one-particle Green's function. It includes naturally a frequency dependence, going beyond the adiabatic approximation. Perturbative calculations under the Tamm-Dancoff approximation, using the configuration interaction singles (CIS) eigenvectors, reveal an appreciable improvement over CIS, time-dependent Hartree-Fock, and adiabatic time-dependent density functional theory results. The perturbative results also compare well with equation-of-motion coupled-cluster and experimental results.