The new measures, that come into force on Wednesday, also cover a range of other crimes including punishment for theft by amputation.
The move has sparked international condemnation. In a public address on Wednesday, the sultan of the small south-east Asian nation called for "stronger" Islamic teachings.
"I want to see Islamic teachings in this country grow stronger," Sultan Hassanal Bolkiah said, according to AFP news agency, without mentioning the new laws.
Under the new law, individuals will only be convicted of gay s-x if they confess or are seen committing the act by four witnesses.
Homosexuality was already illegal in Brunei and punishable by up to 10 years in prison.