We present a gauge theory formulation of a two-dimensional quantum smectic and its relatives, motivated by their realizations in correlated quantum matter. The description gives a unified treatment of phonons and topological defects, respectively encoded in a pair of coupled gauge fields and corresponding charges. The charges exhibit subdimensional constrained quantum dynamics and anomalously slow highly anisotropic diffusion of disclinations inside a smectic. This approach gives a transparent description of a multi-stage quantum melting transition of a two-dimensional commensurate crystal (through an incommensurate crystal - a supersolid) into a quantum smectic, that subsequently melts into a quantum nematic and isotropic superfluids, all in terms of a sequence of Higgs transitions.