Today as I write, it is Thanksgiving; a specifically American tradition that goes back to early Puritan settlers from Europe who survived a particularly harsh winter. You might think therefore that it would make sense to celebrate this day after the winter not before it. But actually the Puritans adopted many Jewish and Biblical traditions.
It was always a tradition in Judaism to fast at times of danger or uncertainty and to thank God when deliverance came. If you recall at Succot we celebrate Simchat Beit HaShoeva, the Rejoicing over the Well House, which was a ceremony initiated by the prophets as part of the ceremonies asking God for rain. In Temple times they poured out precious water over the altar. By pouring out before the need became acute they hoped that God would accept their gratitude and accede to their prayers by sending plenty of rain.
In a similar way, by thanking God in advance of the winter by dedicating and enjoying our food and thanking Him for our good fortune, we hope that we will continue to receive these gifts. In fact every day in Judaism should be a thanksgiving day. The first thing we say in the morning when we wake is the prayer that starts “Modeh Ani", “I thank you God for being alive.” Then during the course of every day, we make a bracha and thank God whenever we enjoy the good things of life.