01 - Bring a large pot of salted water to a rolling boil.
02 - In a food processor, combine basil, garlic, pine nuts, and Parmesan. Pulse until coarsely chopped. With the motor running, slowly stream in the olive oil until a smooth, creamy sauce forms. Season with salt, pepper, and lemon juice if using. Set aside.
03 - Add the gnocchi to the boiling water and cook according to package instructions, usually until they float to the surface, about 2–3 minutes.
04 - Drain the gnocchi in a colander, reserving a small amount of the cooking water.
05 - Transfer the hot gnocchi to a large bowl and toss thoroughly with the pesto sauce. Add a splash of the reserved cooking water if needed to achieve a silky consistency.
06 - Plate immediately, generously garnished with extra grated Parmesan, fresh basil leaves, and additional pine nuts if desired.