These galls affect both Staghorn Sumac (Rhus hirta) and Smooth Sumac (Rhus glabra). Some writers state they see them most often on Staghorn but in my area they are always on Smooth Sumac. This rather large gall arises with a small aphid, Melaphis rhois lays an egg on the leaf underside. This causes the leaf to secrete material that forms a sac over the egg. Inside, a number of generations of aphids form and females leave the gall in late Summer where they lay eggs on a host plant and those eggs produce the aphids for the next seasons infestation.
John Muir wrote in 1911: Each species seems to know what kind of plant will respond to the irritation or stimulus of the puncture it makes and the eggs it lays, in forming a growth that not only answers for a nest and home but also provides food for the young." From his essay Mt. Hoffman and Lake Tenaya.
Below: 1st photo - a Smooth Sumac leaf with a number of galls. 2nd photo - Galls are large and frequently with reddish tints. 3rd photo - the inside of a gall with young aphids.