A compound produced when gut bacteria break down substances in pomegranates and walnuts dramatically improved heart function in animal tests, raising hopes of a future treatment for heart failure.