Heat a dry skillet over medium heat. Add the walnuts and toast them for about 3-5 minutes, shaking the pan frequently to prevent burning. Once golden and fragrant, transfer to a plate to cool.
In a food processor or blender, combine fresh basil leaves, grated Parmesan cheese, minced garlic, and olive oil. Pulse until smooth but still slightly textured. Season with salt and pepper.
Bring a large pot of salted water to a boil. Add the potato gnocchi and cook 2-3 minutes or until they float to the surface. Using a slotted spoon, transfer gnocchi to the skillet used for walnuts.
Lower heat to medium-low. Add heavy cream to the skillet with gnocchi. Stir gently to warm the cream, then add the pesto. Toss to coat gnocchi in creamy pesto sauce. Season with salt and pepper.
Plate the creamy pesto gnocchi and sprinkle toasted walnuts on top. Garnish with fresh basil leaves or extra grated Parmesan if desired. Serve immediately.