The man was identified as Paul Martin. The arrest was confirmed by the Foreign Office, which also said it was providing consular assistance.
A Hamas spokesman said Mr Martin was arrested for violating security but further details were not given.
Reports say he was taken into custody for a fortnight while attending a court hearing.
Mr Martin has written for the BBC and the Times.
Hamas interior ministry spokesman Ehab Ghussein said: "We have confessions that the British journalist committed offences against Palestinian law, and that harms the security of the country."
Hamas is the Palestinian militant Islamist organisation that took control of Gaza by force in 2007.