I have seen two versions:
a) *-ia ending actually derived from the collective number form, which also ends in *-ia. So the collective number first started to represent abstract things (compare Latin animalia, Greek zooia), and then came to mark feminine gender.
b) From Eurasiatic *haia, "mother", from Borean *haia, "mother" (see Nostratic etymology) which explains similar feminine *-ia endings in Semitic, IE and Altaic.
The account for Laryngeal theory is only compatible with version a) and cannot explain how Eurasiatic *-ia became PIE *-ih2.