Police in Bahrainsay a 17-year-old boywas killed when the bomb he was trying to plant went off in his hands.
Witnesses said a worker at a nearby warehouse was wounded by the blast.
Holes were visible in the walls of the pre-fabricated home used by the workers as a sleeping area.
Bahrain's state news agency said a gun and ammunition were found near the body of the bomber said to have been wanted by security forces for criminal offences.
The incident happened in the village of Bani Jamra, west of the capital, Manama.
Sunni-ruled Bahrain has largely put down an uprising by mostly Shi'ite protesters demanding reform.
But small-scale clashes have continued and bomb attacks have been on the rise since the middle of last year.
According to Reuters, Bahrain has faced political turmoil and a rise in small-scale clashes and attacks since 2011.
Earlier in the day, a Bahraini court sentenced six people to 10 years in jail each after it found them guilty of a fire bomb attack on a police patrol in the village of Jadhafs, near Manama, which injuring two officers and setting their vehicle on fire.
State news agency BNA said the court had exercised leniency in passing the sentences, taking into consideration that five of the suspects were under 18 years of age when the attack took place. It gave no date for the attack.