Finely dice 1 medium shallot (about ¼ cup). Mince 3 garlic cloves. Thinly slice ½ cup drained oil-packed sun-dried tomatoes. Finely grate 1 ounce Parmesan cheese (about ½ packed cup) if needed, or measure out ⅓ cup store-bought grated.
Pat 1 ½ pounds boneless, skinless chicken thighs dry with paper towels. Season all over with ½ teaspoon of the kosher salt and ½ teaspoon black pepper.
Heat 1 tablespoon of the olive oil in a 12-inch cast iron or high-sided nonstick skillet over medium-high heat. Add the chicken in a single layer and cook until deeply browned and an instant-read thermometer inserted into the thickest part registers 165°F, about 5 minutes per side. Transfer the chicken to a plate.
Reduce the heat to medium. Add the remaining 1 tablespoon olive oil and heat until shimmering. Add the shallot, garlic, sun-dried tomatoes, and remaining ½ teaspoon kosher salt. Cook until fragrant, about 1 minute. Sprinkle 1 tablespoon all-purpose flour evenly over the tomato mixture and cook until the flour begins to brown, 30 seconds to 1 minute. Add 2 cups whole or 2% milk and bring to a rapid simmer, stirring regularly.
Add 1 pound shelf-stable potato gnocchi (breaking the gnocchi apart if needed). Cook, stirring frequently, until the sauce is reduced slightly and thickened and the gnocchi is tender, about 3 minutes. Remove the skillet from the heat.
Add the Parmesan and 3 packed cups baby spinach. Stir until the cheese melts and the spinach wilts. If the sauce gets too thick, add more milk 1 tablespoon at a time until you reach the desired consistency. Nestle the chicken into the gnocchi mixture, and add any accumulated juices on the plate, before serving.
