Elasticity has been linked to the remarkable propulsive efficiency of pulse-jet animals such as the squid and jellyfish, but reports that quantify the underlying dynamics or demonstrate its application in robotic systems are rare. This work identifies the pulse-jet propulsion mode used by these animals as a coupled mass-spring-mass oscillator, enabling the design of a flexible self-propelled robot. We use this system to experimentally demonstrate that resonance greatly benefits pulse-jet swimming speed and efficiency, and the robot's optimal cost of transport is found to match that of the most efficient biological swimmers in nature, such as the jellyfish Aurelia aurita. The robot also exhibits a preferred Strouhal number for efficient swimming, thereby bridging the gap between pulse-jet propulsion and established findings in efficient fish swimming. Extensions of the current robotic framework to larger amplitude oscillations could combine resonance effects with optimal vortex formation to further increase propulsive performance and potentially outperform biological swimmers altogether.