What I could see in doing a brief web search was that it seems to have been written by John Francis Wade. Can't discover in what language it was originally written. It was published in 1782 in Samuel Webbe's An Essay on the Church Plain Chant, and perhaps earlier by Wade himself. Some sites have the Bonaventura theory; others debunk it. Some think Wade wrote the tune, others that it comes from Portugal, perhaps written by a certain Marcus Antonius de Fonseca, master of the chapel of the King of Portugal. We know it was sung at the Portugese Embassy in London in 1797.
Latin words here.