Topological defects play a key role in a variety of physical systems, ranging from high-energy to solid-state physics. A skyrmion is a type of topological defect that has shown promise for applications in the fields of magnetic storage and spintronics. We show that optical skyrmion lattices can be generated using evanescent electromagnetic fields and demonstrate this using surface plasmon polaritons, imaged by phase-resolved near-field optical microscopy. We show how the optical skyrmion lattice exhibits robustness to imperfections while the topological domain walls in the lattice can be continuously tuned, changing the spatial structure of the skyrmions from bubble type to Néel type. Extending the generation of skyrmions to photonic systems provides various possibilities for applications in optical information processing, transfer, and storage.