He came from Pengcheng 彭城 (modern Xuzhou 徐州, Jiangsu) and was an expert in the five Confucian Classics. His contemporarians compared him with the Confucian scholar Gong She 龔舍 and called both "the two Gongs of Chu" 楚兩龔.
In the beginning Gong Sheng was only a small official in the local administration but was promoted to Grand master of remonstrance (jian dafu 諫大夫) during the reign of Emperor Ai 漢哀帝 (r. 7-1 BCE). For his helpful memorials to the throne he was appointed Grand Master of Splendid Happiness (guanglu dafu 光祿大夫) and *Palace steward leader of the officials (zhuli jishizhong 諸吏給事中). Later on he became governor (taishou 太守) of the commandery of Bohai 渤海.
When the regent Wang Mang 王莽 had become the virtual master of the dynasty, he returned home. Wang Mang had searched for him and offered Gong Sheng a position of senior minister (shangqing 上卿), yet Gong refused and refused to eat until he died.