According to legend, this delicate thread is the ravelling of the Virgin Mary's winding-sheet, which fell to earth on her ascension to heaven. It is said to be God's seam, i.e. God's thread. Philologically it is the Latin gossipin-us, cotton.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894