Bring a large pot of salted water to a rolling boil over medium-high heat and keep it boiling for cooking the gnocchi.
Heat a large high-sided skillet over medium heat, then add the olive oil and diced onion; season with a pinch of salt and cook 4–5 minutes until softened and starting to brown.
Add the minced garlic and dried thyme to the skillet and cook 1 minute until fragrant.
Add the butter and stir until fully melted, then sprinkle the flour over the mixture and cook, stirring, 1 minute until the roux thickens and bubbles.
Slowly whisk in the milk, breaking up any lumps, then bring the sauce to a gentle bubble and cook about 5 minutes until it coats the back of a spoon.
Remove the sauce from the heat and stir in the ground nutmeg; season 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 surface.
While the gnocchi cook, stir the grated Parmesan, fresh spinach, and lemon juice into the warm cream sauce; the spinach will wilt as you combine.
When the gnocchi float, scoop them out with a spider strainer or slotted spoon and add directly to the spinach cream sauce; toss to combine.
If the sauce is too thin, add 1/4–1/2 cup of the hot starchy gnocchi cooking water and toss until desired consistency is reached.
Serve immediately topped with extra Parmesan if desired.