The present church was built in 1865-1866 to replace a very old disused chapel dedicated to Saint Gilles. It was not until April 9, 1862 that Saint-Gilles was established as a municipality by imperial decree of Emperor Napoleon III.
On June 20, 1862, the municipality was organized with its first mayor and council who two years later launched a subscription to acquire the buildings Desmarets originally built by a treasurer of the king.
The town hall and school were installed in these buildings and in 1866, the shops being part of the acquisition, they were converted into a church and made ready for worship.
The appearance of the church is unusual, as the stores consisted of a huge building, built very solidly on one of the most beautiful cellars in the area. Three bays (vats) were assigned to the church, the fourth (stable) to the sacristy and the fifth (shed) to the storeroom and then to the servant's quarters. The bishop of Autun wrote in 1901 to the prefect that the cellar full of water forms a real small lake
The church has neither apse nor transept and is therefore not in the shape of a Latin cross as tradition dictates. The commune had to wait until it had the means to buy the buildings, where the bell tower-porch was built in 1889-1890 on the plans of 1888 by the Parisian architect François Dulac.