Gongsanseong (Korean: 공산성; Hanja: 公山城; MR: Kongsansŏng) is a castle in Gongju, South Chungcheong Province, South Korea.
It occupies an area of 20 hectares (49 acres), presently in the Geumseong-dong and Sanseong-dong districts.
It was unearthed during the archaeological excavations done after 1980s, when the constriction methods in building the forts's rampart, the royal palace, and the associated structures of the royal palace were revealed.
It was built as a defense fortification adapted to the local topography by linking mountain peaks and bridging the valleys.
Following the collapse of the Baekje empire, the ramparts were rebuilt fully as stone walls.