Are gravitational waves longitudinal or transverse?

Gravitational waves are transverse waves but they are not dipole transverse waves like most electromagnetic waves, they are quadrupole waves. They simultaneously squeeze and stretch matter in two perpendicular directions. Gravitational waves definitely propagate in a given direction but the effect that they have on matter is completely perpendicular to the direction of motion. Below is a picture of what the metric of a passing wave does to space (the wave traveling is perpendicular to the screen). If you imagine a free particle sitting at each grid intersection point, the particle would move sinusoidally right along with the grid:

enter image description here This diagram is from this paper


in the linearized limit of General relativity, as FrankH said, all propagating perturbations of the metric are transverse.

However, it must be noted that the full theory does allow for nonlinear longitudinal modes of propagation. According to the Petrov classification, such regions of longitudinal propagation are region III. There are usually not taken as true propagating modes since they fall of as the inverse cube of distance to the source, so they are interpreted as a kind of evanescent wave