The present study explores knowledge of Spanish grammatical gender in both comprehension and production by heritage language speakers and second language (L2) learners, with native Spanish speakers as a baseline. Most L2 research has tended to interpret morphosyntactic variability in interlanguage production, such as errors in gender agreement, as a lack of native-like representation in the learner's grammar because of maturational constraints. From this perspective, adult English-speaking learners of Spanish are incapable of acquiring gender fully, whereas heritage Spanish speakers, who have been exposed to the language from birth, can attain complete gender acquisition. However, results of two tasks, one measuring written comprehension and the other oral production, show that advanced proficiency L2 learners, as well as advanced proficiency heritage speakers, have gender in their underlying grammars, and that the errors in oral production that L2 learners occasionally produce are due to difficulties in the surface manifestations of the abstract features of gender, i.e., the “mapping problem” (Lardiere, 2007).