01 - Bring a large pot of salted water to a rolling boil over high heat.
02 - Combine basil, garlic, pine nuts, and Parmesan in a food processor. Pulse until coarsely chopped. With motor running, slowly drizzle in olive oil until smooth and creamy. Season with salt, pepper, and lemon juice if desired. Set aside.
03 - Add gnocchi to boiling water and cook according to package directions, typically 2–3 minutes until they float to the surface.
04 - Drain gnocchi in a colander, reserving approximately 1/4 cup of the cooking liquid.
05 - Transfer hot gnocchi to a large bowl. Add pesto and toss thoroughly, adding reserved cooking water as needed for a silky consistency. Serve immediately topped with extra Parmesan, fresh basil, and additional pine nuts if desired.