Gesang was born in the central Javanese city of Surakarta (Solo). His father owned a batik-fabric business, which however went bankrupt when Gesang was still in his teens, plunging the family into poverty. Gesang, a self-taught musician who was however illiterate in musical notation, supported himself and his family by writing songs and singing at local functions such as weddings and other formal occasions.
In 1940, during the Japanese occupation of Indonesia in World War II, the impoverished 23 year-old musician composed a tune (using a flute) in the popular urban local style known as kroncong, a musical tradition of the region which combined Javanese chord progressions with Westernised vocal stylings, instrumental arrangements and melodies. The style had its origins in the 17th century Portuguese influences on the region, and was at the time associated with the urban poor and as such had somewhat of an unsavoury reputation, particularly among traditionalists.
For the lyrics, Gesang turned to the city's river for inspiration. The Bengawan Solo River is Java's longest river and most important waterway for trade and agriculture, and seemed to Gesang to symbolise the durability of Javanese culture in those troubled times. Gesang himself would later remark "I had dreamt since my childhood about writing a song of praise for the immortal Solo River".
Gesang added the song, Bengawan Solo, to his repertoire, and it soon became widely popular among the local Javanese community. The song rose to national prominence when recordings of it were aired on local radio stations. It also found an appreciative audience among the Japanese occupation forces, some of whom took to singing it with lyrics translated into Japanese. It was popular also among the non-Javanese prisoners (principally Dutch civilians) of the Japanese internment camps, many of whom also spoke Indonesian. The simple but nostalgic lyrics and popular-sounding melody held equal appeal to the long-standing resident and the homesick soldier.
As World War II drew to a close, the returning soldiers of the Japanese Imperial Army brought the song back to Japan. In the dark period immediately after Japan's defeat, the song caught the public mood, and its fame soon spread throughout the country after best-selling recordings of it were released by popular singers, starting with Toshi Matsuda's 1947 recording. It was to be periodically re-released by various popular artists, and the song soon became almost synonymous in Japan with Indonesian music, many assuming that it was a centuries-old traditional song.
Versions of the song were also released in other Asian countries, and it has since been recorded many times by famous artists worldwide.
Gesang remained in the city of his birth, continuing to compose and sing, his fame spreading through the decades. He became regarded as the leading exponent and senior figurehead of the Solonese kroncong style, which is now regarded as a respectable, even somewhat starchy and dated style, well and truly assimilated from its humble and scandalous prior associations.
In 1991, a group of appreciative Japanese war veterans arranged for a life-sized statue of Gesang to be erected in a Surakarta park, to mark their respects for the composer of the tune that had managed to cross the cultural barriers of wartime.