The old name of Gongju is Gomanaru, written in Chinese characters as Ungjin. When Baekje's capital Hanseong (Seoul) fell to a Goguryeo invasion in 475, Baekje moved its capital to Ungjin. From then on, until it moved again to Sabi (Buyeo) in 538, Ungjin was the center of Baekje for 64 years. The royal fortress of this period was Ungjinseong, which is today's Gongsanseong. It is a natural stronghold built by using the terrain of Gongsan, which drops steeply to the Geumgang River.
Gongsanseong did not end its use even after Baekje moved its capital to Sabi. Gongju City writes that it was the Bukbangseong among the 5 regional fortresses, and that in 630, when the palace at Sabi was repaired, the king moved his residence to Gongsanseong. In July 660 King Uija took refuge here from Sabi, stood against the Silla–Tang allied forces and surrendered. Even after Baekje fell, it had the seat of Ungcheonju under Unified Silla, and the Chungcheong Gamyeong and Junggunyeong under Joseon, so it remained a regional base for a long time. The names changed accordingly, Ungjinseong, Ungcheonseong, Gongsanseong and Ssangsusanseong, and the stone wall seen today is how it looked after being rebuilt in the reigns of Seonjo and Injo of Joseon.
Excavations continuing since the 1980s have confirmed a Baekje-era royal palace site, ponds, wooden storehouses and storage pits. On the northwest site where facilities related to the palace stood, more than 80 building sites came to light. A lacquered armor found in a water-storage facility bears an inscription in red letters, "Jeonggwan 19", meaning 645 (the 5th year of King Uija), and it has great value as historical material. The panchuk method of ramming fine soil and sandy soil in alternate layers, and the byeokju building sites, built by digging a trench and setting posts closely in it, are explained as evidence of exchange of building techniques with China and Japan.
Surveys during the Japanese colonial period are said to have found dozens of tombs, but the ones maintained now are 7, including the Tomb of King Muryeong. Tombs No. 1 to 5 are stone-chamber tombs with a corridor entrance, the representative Baekje tomb type, and Tomb No. 6 and the Tomb of King Muryeong are brick tombs, a type popular in China. The Korea Heritage Service writes that Tombs No. 1 to 4 had already been looted before they were surveyed. The Tomb of King Muryeong was found by chance in 1971 while the drainage system of Tombs No. 5 and 6 was being repaired. Thanks to the stone epitaph found in the tomb, its owner was identified as the 25th king of Baekje, King Muryeong, and Gongju City explains it as the only royal tomb among Three Kingdoms-period tombs whose owner is known.