Bring a large pot of salted water to a rolling boil and keep it hot for the gnocchi.
Heat a large high-sided skillet over medium heat, add the olive oil and diced onion, season with 1/8 teaspoon kosher salt, and cook 4–5 minutes until soft and beginning to brown.
Add the minced garlic and dried thyme and cook for 1 minute until fragrant.
Add the butter and stir until melted, then sprinkle in the flour and cook, stirring, about 1 minute until the roux bubbles and smells toasty.
Slowly pour in the milk while whisking to smooth any lumps; bring to a gentle bubble and cook about 5 minutes until the sauce coats the back of a spoon.
Remove the sauce from the heat, stir in the ground nutmeg, and adjust seasoning with salt and pepper to taste.
Add the gnocchi to the boiling water and cook according to package directions, usually about 3 minutes, until they float to the top.
While the gnocchi cook, stir the grated Parmesan, fresh spinach, and lemon juice into the warm cream sauce; the spinach will wilt slightly from the sauce's heat.
When the gnocchi float, scoop them out with a spider or slotted spoon and add to the skillet with the sauce; toss gently to combine and serve immediately.