[noun] + がある + [noun] [noun] + のある + [noun] [noun] + がない + [noun] [noun] + があった + [noun]
A noun with がある in front of it means "a that has ", "a with ". The clause comes before the noun it describes: にわ庭があるいえ家 is "a house with a garden". The thing that is there keeps が.
English puts "with a garden" after the noun; Japanese puts the clause in front. いえ家ににわ庭がある is a whole sentence, "the house has a garden". にわ庭があるいえ家 is a noun, and it goes where any noun goes in a bigger sentence.
Inside the clause, が can turn into の with no change in meaning: にわ庭のあるいえ家 and 庭がある家 are both normal. は doesn't go inside the clause.
The usual split between ある and いる still holds: a person or an animal takes いる, as in こども子供がいるかぞく家族.