The men fled in a blue sedan, witnesses said. They have been described only as Pacific Islander or Maori in appearance.
Police sources say the five men were looking for a person who was not at home at the time of the attack. The property and its occupants are known to police.
The incident was targeted, but police say is unrelated to a string of shootings that have occurred across Sydney in the past week.
The motive and events leading up to the attack remain under investigation.
Later on Tuesday night, a 22-year-old man, believed to be a resident of the house, returned to the property.
After allegedly refusing to co-operate with police, he was arrested and taken to Fairfield police station where he was charged with two counts of resisting or hindering police, and possessing a prohibited drug.
He was granted conditional bail and is due to appear in Fairfield Local Court on Wednesday.
A crime scene was established and investigations are ongoing.