You're right that a central mass can't explain the spiral structure (and you're also right about the tangent motion in case the string breaks). Spiral structure is indeed partially caused by gravity, but hydrodynamic forces are also important, as I will explain below:
Theories of the formation of spiral structure in galaxies go roughly 100 years back and flourished in the 1960's and 1970's, after which there hasn't been any ground-breaking advances. Spiral arms were first discovered by Lord Rosse (1845) through his homemade 1.8 m telescope, the Leviathan of Parsonstown, but it wasn't until Edwin Hubble's and others' realization, in the 1920's, that the nebulae were outside the Milky Way that their immense sizes were appreciated, and with that also the implied speeds.
How not to form spiral arms
Astronomers soon realized that the rotation should wind up the spiral structure on timescales much shorter than the age of the stars inside them (e.g. Wilczynski 1896), so some mechanism was needed to maintain the spiral pattern. The is called the winding problem, illustrated below:
The winding problem: Stars that start out aligned and rotate at the same speed around the center of the galaxy will initially form a spiral pattern. However, the pattern will be wound up after a few 100 million years, in clear conflict with the fact that we see lots of spiral galaxies that are 10 or 100 times that age. In this simple simulation, which can be seen animated here, I assumed a radius of 10,000 lightyears and a speed of 200 km/s.
From the 1920's to his death in 1965, the Swedish astronomer Bertil Lindblad worked on solving the mystery of the formation and maintenance of spiral arms. His basic idea was to consider spiral arms as patterns made out of the trajectories of individual stars (e.g. Lindblad 1927; 1940; 1961).
The interaction between the trajectories were then supposed to create a number of "quasi-stationary" spiral patterns, i.e. patterns whose shape is "frozen", moving around with a speed which is not the same as the speed of the stars (Lindblad 1963).
The stars in the disk of the galaxy, both inside the arms and in-between, will have an overall orbit but will also oscillate slightly around this orbit. Under certain conditions, the trajectories will tend to become elliptical. If stars in different distances follow elliptical, shifted orbits, some regions will form in the disk where the density of stars is greater than in the rest of the disk. As seen below, these overdensities will be spiral-shaped:
Lindblad's kinematic spiral waves. On the left are elliptical orbits whose major axes all have the same phase. To the right, the phase is shifted increasingly more, the larger the orbit. The result is a spiral-shaped overdensity of stars.
How to form spiral arms
Lindblad's theory could explain certain aspects of the spiral arms, but most of his works is sort of forgotten now. He made a wealth of insightful considerations, but has probably been hampered by a lack of both empirical evidence, computing power and, especially, falsifiable predictions, the cornerstone of science.
Density wave theory
Shortly before Lindblad's death, a breakthrough was made by Lin & Shu (1964): Considering the gas and stars as a continuous fluid and using equations known from hydrodynamics, they showed that the spiral arms could be thought of as waves in the density of gas and stars. The basic idea in this density wave theory is that the gravitational force from primarily the stars creates waves, and that these waves then move through the disk of the galaxy. Just as in Lindblad's theory, the density waves are quasi-stationary and are therefore not wound up.
When gas and stars are inside the wave, they move a little slower than otherwise, so that the density here is slightly larger than outside the wave (this effect is often compared to cars piling up behind a slow-moving truck on the highway; although all cars are moving forward, overdensities of cars are created in the vicinity of the truck). Within a certain distance of the center of the galaxy, called the corotational radius, matter overtakes the waves — further out, it is the waves that overtake the matter.
As gas clouds move into the increased density of a spiral arm, they are shocked and compressed. This effect causes the clouds to collapse and form masses of new stars. Star are born both big and small; the most massive stars shine the brightest, in blue colors, but also die quickly. On the other hand, the small stars are faint and reddish, and live long. This is the reason for the bright, bluish spiral arms: Once the stars move out of the arms, the blue one have died out, leaving only the fainter ones to occupy the space between the waves.
Blue spiral arms: When a gas cloud enters the density waves that make up a spiral arm, either by overtaking or being overtaken by the wave, it shock-compresses, fragments, and forms stars. Whereas the small stars eventually leave the wave, the massive stars — which are the ones that make the arms so prominently bright and blue — die before leaving the arms.
The theory explains how the density waves propagate in the galactic disk, and how they help form new stars, but it doesn't exactly explain how they're formed in the first place. Their origin isn't entirely clear, but can probably be caused by several different mechanisms, e.g gravitational instabilities or tidal forces from a neighboring galaxy.
Even after half a century, and despite many unclear and unexplained circumstances, the density wave theory is still one of the two prevailing theories on spiral structure. The Lin & Shu paper has more citations than all of Lindblad's collected works over 50 years, and for a good reason: The theory explains, detailed and quantitatively, many aspects of spiral galaxies, including the density in the arms, their width and lifetime, and where dust clouds are located. Nevertheless, their is more to it than this, and other theories have been proposed.
Self-propagating star formation
In particular one theory has gained wide acceptance, namely the "self-propagating (stochastic) star formation" (SPSF, Mueller & Arnett 1976; Gerola & Seiden 1978). This theory is completely different from the density wave theory:
When the most massive stars explode as supernovae, they send "detonation waves" through the interstellar gas in the galaxy. An explosion therefore causes nearby gas clouds to shock-collapse and form stars, and in this way the star formation spreads like "rings in the water" from the original explosion. However, due to the differential rotation of the galaxy's disk (i.e. the difference in angular speed at different distances from the center), the "rings" — which consist of young, bright stars as well gas clouds that are lit up by the UV light of the stars — are therefore quickly pulled into elongated structures.
Early computer simulation of self-propagating star formation. The three images show a galaxy 25, 200 and 500 million years after the start of the simulation. The spiral patterns created by the differential rotation are evident, although it is not easy to tell how many arms it has. Credit: Gerola & Seiden (1978).
The result is a so-called flocculent spiral galaxy. The word means "wool-like", referring to the fact that the disk consists of multiple small parts of spiral arms, together forming a fluffy spiral pattern.
Individual spirally structures are quickly wound up, but new ones are continuously formed. In contrast to galaxies dominated by density waves, flocculent galaxies therefore typically do not have a well-defined number of spiral arms.
A combination of multiple mechanisms
In other words, in the density wave theory spiral arms cause star formation, whereas in SPSF star formation causes spiral arms.
In some galaxies it is clear that one or the other theory is the explanation, while in other galaxies, for example the Milky Way, there may be a mixture of several mechanisms at play. The figure below shows the galaxies M51 (the one in which Lord Rosse found spiral structure) and NGC 4414 which are dominated by density waves and SPSF, respectively.
Credit: NASA, ESA, S. Beckwith (STScI) and the Hubble Heritage Team (STScI/AURA) (M51) and The Hubble Heritage Team (AURA/STScI/NASA) (NGC 4414).