Galanin is a peptide that is conserved among different species and plays various roles in an organism, although its entire role is not completely understood. For many years, galanin has been linked mainly with the neurotransmission in the nervous system; however, recent reports underline its role in immunity. Zebrafish (Danio rerio) is an intensively developing animal model to study infectious diseases. In this study, we used larval zebrafish to determine the role of galanin in bacterial infection. We showed that knockout of galanin in zebrafish leads to a higher bacterial burden and mortality during Mycobacterium marinum and Staphylococcus aureus infection, whereas administration of a galanin analogue, NAX 5055, improves the ability of fish to control the infection caused by both pathogens. Moreover, the transcriptomics data revealed that a lower number of genes were regulated in response to mycobacterial infection in gal−/− mutants compared with their gal+/+ wild-type counterparts. We also found that galanin deficiency led to significant changes in immune-related pathways, mostly connected with cytokine and chemokine functions. The results show that galanin acts not only as a neurotransmitter but is also involved in immune response to bacterial infections, demonstrating the complexity of the neuroendocrine system and its possible connection with immunity.