Preheat oven to 425F. Coat any 2 quart or 8"-9" baking pan with cooking spray or butter.
If the spinach is not fully defrosted, you can microwave the spinach in 1-2 intervals. Mix and microwave again until spinach is defrosted.
Transfer the spinach to a kitchen towel or heavy duty paper towel. Squeeze as much liquid as possible out of the spinach as you can. (If your using paper towels, you may want to use a strainer as well incase it breaks) Put the spinach in a bowl and set it aside.
To prepare the cream sauce, melt the butter in a large pot. Remove 1 tablespoon of the butter and set aside for the topping. Add in the onions and sautee them for 5 minutes. Add in the garlic and flour and mix for 1 minute. Add in the heavy cream, milk, and cheese. Stir to combine and let the mixture simmer and thicken for a few minutes. Fold in the spinach.
Transfer the mixture to a greased baking dish. Combine the melted butter set aside earlier with the panko and parmesan to form a topping. Sprinkle it over the gratin.
Bake for 30 minutes until the cheese is golden and the mixture is bubbly. Cool for 5 minutes before serving.