Gloucestershire Police said lit petrol was poured around the door of the Masjid-E-Noor mosque on Ryecroft Street about 01:00 BST.
A spokesman said a man left the scene at speed at about 01:00 BST in a dark-coloured car being driven by an accomplice.
The suspect is currently in police custody and being questioned.
The door of the mosque was left burnt and blackened in the attack, which was captured on CCTV.
Police previously said the man may have burned himself during the attack.
The attack comes after an open day was held at the mosque to welcome in the community.
Councillor Said Hansdot, the first Muslim sheriff of Gloucester, said: “I’m disappointed at what has happened really, as we were trying to open up the mosque for everybody to come around and see what it is all about, and for this to happen now, I’m not very happy at all.
“We’re lucky it didn’t do any more damage.”
Ch Insp for Gloucester, Richard Burge, added: “Gloucester has a wonderfully diverse and welcoming community and I know people will be upset and angry about this.
“I know now the community will come together, help us with our inquiries and show that it utterly rejects acts like this.”