The church was built by the townspeople of old Trosa in the 13th century, when Trosa itself still stood beside the river before land uplift and the fishing trade drew the settlement closer to the sea. The rectangular nave dates from this original build. A sacristy is thought to have been added in the 14th century, following the pattern of many churches in Södermanland, while the sturdy tower, built partly of granite and partly of medieval brick, is believed to date from the mid-15th century and may have served defensive purposes, particularly relevant after the town was ravaged by Erik of Pomerania in 1445.
Star-shaped brick vaults were inserted into the nave and tower during the 15th century. These proved fortunate: in 1773 a stray shot fired at a magpie set the roof and spire ablaze. The vaults held, sparing the church structure, though the bells melted and the old Gädde family burial chapel was destroyed, along with the small St Anna chapel attached to the north side. This chapel is thought to have been built around the 1420s, contemporary with a carved figure of St Anna, mother of the Virgin Mary in tradition, still kept near its entrance.
Rebuilding after the fire raised the tower to greater height and added the spire seen today, while the porch was removed, the south entrance bricked up and turned into a window, and a new west-facing entrance opened in the tower. All the windows were enlarged to a uniform size, and new bells cast to replace those lost in the blaze; one bears an inscription referring to metal recovered from the ashes.
Seventeenth-century wall and ceiling paintings, damaged in the fire, were later limewashed over and only rediscovered and restored during a 1930s renovation. The altarpiece, a Golgotha scene painted in the Netherlands in the 16th century, and a font of Gotland workmanship dating from the church's earliest stone-built period, are among the notable furnishings. A triumphal crucifix in the chancel arch dates from the mid-13th century. Sources differ slightly on the pulpit's origin: one account credits it as a gift from the parish, possibly carved by the Stockholm sculptor Daniel Kortz, while another dates it to 1706 and describes it as marbled with gilt ornament.
An heraldic funeral banner beside the altar, associated with the Bielke family and used at a 16th-century burial, is said to be among the most complete surviving examples of its type in Sweden. The church's first organ was installed in 1853, and the current instrument, built in 1969, retains the earlier organ's façade.