His first studies were in Bienne and Lausanne. He studied the piano with Auguste Laufer and harmony with Justin Bischoff. In 1905, he spent eight months in Berlin, where he studied composition with Richard Rössler. In 1908, he moved to Paris, where he studied the organ with Louis Vierne and composition with Vincent d'Indy. He stayed there for eight years, during which he was organist at the Lutheran Church of the Redemption. In 1916, he became organist at the Temple de Saint-Jean in Lausanne, and also taught courses at the conservatory. In 1925, he was invited to become director of the conservatory at Geneva, where he remained until his retirement in 1961.
Gagnebin worked in most musical genres, with the exception of opera: he wrote symphonies, two ballets, a trio, four quartets, a large number of pieces for various instrumental groups, four toccatas for the piano, a piano concerto, more than one hundred pieces on Huguenot psalms, two church sonatas and a number of organ pieces. He was also a frequent contributor to music periodicals, including La Tribune de Genève.