The terminology in topology seems to go back a long way: *Über die Torsionszahlen von Produktmannigfaltigkeiten* (Mathematische Annalen 1924) is the paper in which Künneth sets out to show how the torsion in homology behaves in a product, and there he footnotes earlier work of Poincaré and Tietze (his advisor) on the "Torsionszahlen". So it is a fair bet the terminology goes back at least to Tietze. In terms of the question "algebra or topology first?", I'd therefore lay bets on topology, bearing in mind that homology wasn't clearly formulated as taking values in abelian groups until a little later. The more general idea of "twisting" probably awaited the theory of bundles, a little later again.