After his religious profession as a member of the Order on 12 November 1851, he began his studies for the priesthood, which he completed in 1856, being ordained a priest on 20 December 1856.
At the First Vatican Council in 1870, Gotti served as a peritus (theological advisor) to the Prior General of the Discalced Carmelite Order.
When it became clear Rampolla had too many opponents to be able to gain the necessary 42 votes for election, his supporters turned to Cardinal Giuseppe Sarto, and after seven ballots Sarto was elected as Pope Pius X. Gotti is the only Carmelite cardinal to have been a serious candidate for the papacy since the Order was founded in the 13th century.
His remains were buried in the chapel of the Discalced Carmelite Order in the Campo Verano Cemetery of Rome.
On 21 March 1966, his remains were transferred to the Chapel of San Giovanni Battista in the Church of Santa Maria della Scala.