The vertebrate heart is unique among the blood pumps described in metazoans. In contrast to the myoepithelial tubes found in most animal phyla, the vertebrate heart is made up of multilayered myocardial cells surrounded by connective tissue derived from epicardium and endocardium, and endowed with complex valvular, coronary vessel and conduction systems. Despite these profound differences, a common genetic program seems to underlie the specification and differentiation of all the cardiac tissues. In this article, we will review the similarities in the transcriptional networks and signalling mechanisms regulating cardiac development in different animals, as well as the origin of the main differences existing between vertebrate and invertebrate hearts. We will pay special attention to the hypotheses concerning the evolutionary origin of the endothelium and the epicardium from ancestral blood cells and pronephric progenitors, respectively. We can summarize the transition between the invertebrate and the vertebrate heart as the result of the thickening of the primarily myoepithelial cardiac tube which was concomitant with: 1) an inner lining by an endothelium with the ability to transform into mesenchyme; 2) an outer lining derived from an ancestral pronephric glomerular primordium with vasculogenic potential; 3) a neural crest cell population which reaches the heart from the pharyngeal region; 4) the incorporation of new myocardium at both ends from a second heart field and 5) the formation of specialized chambers. The complex interactions between all these elements originated an exceptionally powerful blood pump which allowed vertebrates to reach their characteristically large size and activity.