Let $C$ be a curve of genus $g$. A fundamental problem in the theory of algebraic curves is to understand maps $C to mathbb{P}^r$ of specified degree $d$. When $C$ is general, the moduli space of such maps is well-understood by the main theorems of Brill--Noether theory. Despite much study over the past three decades, a similarly complete picture has proved elusive for curves of fixed gonality. Here we complete such a picture, by proving analogs of all of the main theorems of Brill--Noether theory in this setting. As a corollary, we prove a conjecture of Eisenbud and Schreyer regarding versal deformation spaces of vector bundles on $mathbb{P}^1$.