Melt the butter in a large pot over medium heat. Add the onion and cook until soft and lightly golden, about 4 to 5 minutes. Stir in the garlic and cook just until fragrant.
Pour in the chicken broth and bring to a gentle simmer. Stir in the heavy cream and shredded chicken.
Add the gnocchi and cook for 3 to 4 minutes, until they float and are tender. Stir in the spinach and let it wilt. Season with salt and black pepper, then serve hot.