Preheat the oven to 450 degrees F.
On a sheet pan, toss the gnocchi and butternut squash with 2 tablespoons olive oil, 1/2 teaspoon kosher salt and 1/4 teaspoon black pepper. Spread them into a single layer. Roast for 15 minutes until they start to brown at the edges.
Toss the gnocchi and squash on the pan, adding the onions. Continue roasting for 10-15 minutes until the squash is tender and everything is browned.
While the gnocchi and butternut squash are roasting, make the pesto. Combine the garlic, parsley, walnuts, Parmesan, lemon juice, 1/4 teaspoon salt and 1/4 teaspoon black pepper in a food processor or blender and finely chop them. With the motor running, drizzle in 1/4 cup olive oil through the feeder tube, processing until combined.
Transfer the roasted squash, onions and gnocchi to a large bowl. Stir in half the pesto, adding more as desired.
Divide onto serving plates or into individual bowls and top with chopped walnuts and Parmesan.