Understanding of the geologic evolution of Mars has been greatly improved by recent orbital, in situ and meteorite data, but insights into the earliest period of Martian magmatism (4.1 to 3.7 billion years ago) remain scarce. The landing site of NASA’s Curiosity rover, Gale crater, which formed 3.61 billion years ago within older terrain, provides a window into this earliest igneous history. Along its traverse, Curiosity has discovered light-toned rocks that contrast with basaltic samples found in younger regions. Here we present geochemical data and images of 22 specimens analysed by Curiosity that demonstrate that these light-toned materials are feldspar-rich magmatic rocks. The rocks belong to two distinct geochemical types: alkaline compositions containing up to 67 wt% SiO2 and 14 wt% total alkalis (Na2O + K2O) with fine-grained to porphyritic textures on the one hand, and coarser-grained textures consistent with quartz diorite and granodiorite on the other hand. Our analysis reveals unexpected magmatic diversity and the widespread presence of silica- and feldspar-rich materials in the vicinity of the landing site at Gale crater. Combined with the identification of feldspar-rich rocks elsewhere and the low average density of the crust in the Martian southern hemisphere, we conclude that silica-rich magmatic rocks may constitute a significant fraction of ancient Martian crust and may be analogous to the earliest continental crust on Earth.