St David's Church was founded in 1187, built on the site where a famous synod was held in the sixth century. According to local legend, it is said that during this synod, which St David addressed, the flat ground rose into a mound beneath his feet, allowing him to be better seen and heard by the vast crowd that had gathered to hear him speak. The church supposedly stands on that same mound. It's possible that, in reality, it was built on the site of a Bronze Age barrow.
The central tower dates from the 12th century, which, in medieval times, had five bells in its belfry. Today there is only one bell, which was given to the church by John Inglis Jones of Derry Ormond in 1874. The 12th century nave and chancel were taken down in 1832, being beyond repair, and replaced in 1833–34. The new building was of poor quality, however, and the nave as it stands today was rebuilt in 1874, and the Chancel in 1886.
References:Visby Cathedral (also known as St. Mary’s Church) is the only survived medieval church in Visby. It was originally built for German merchants and inaugurated in 1225. Around the year 1350 the church was enlarged and converted into a basilica. The two-storey magazine was also added then above the nave as a warehouse for merchants.
Following the Reformation, the church was transformed into a parish church for the town of Visby. All other churches were abandoned. Shortly after the Reformation, in 1572, Gotland was made into its own Diocese, and the church designated its cathedral.
There is not much left of the original interior. The font is made of local red marble in the 13th century. The pulpit was made in Lübeck in 1684. There are 400 graves under the church floor.