On the origins of Thanksgiving as a national holiday, the Gilder Lehrman Institute of American History features this article, “Giving Thanks: Women Move to Create a Holiday” on its sponsored website historynow.org:
[T]he idea of a permanent, national day of Thanksgiving became a dream of one of the most influential women in the antebellum era — Sarah Josepha Hale, editor of Godey’s Lady’s Book **** [S]he campaigned to make the third Thursday in November a national holiday. She explained,”Thanksgiving, like the Fourth of July, should be considered a national festival and observed by all our people.” Year after year, Hale wrote to the governor of each state, to congressmen and senators, and to the White House, urging official government recognition of this celebration. Yet Hale was unsuccessful; localities and states continued to declare thanksgiving days, but no national agreement emerged.
During this period, state-decreed days of thanksgiving were most common in the territories and new states. *** With Lincoln’s election and the outbreak of war in 1861, the appeal of an annual homecoming, when a family might gather together, became even more poignant. In September1863, Sarah Josepha Hale penned an editorial in which she wrote,”Would it not be better that the proclamation that appoints Thursday the 26th of November (1863) as the day of Thanksgiving for the people of the United State of America, should, in the first instance, emanate from the President of the Republic?”***
But with hundreds of thousands of soldiers away from home, and with a president attuned to the mood of the nation, Lincoln issued a proclamation in 1863 that Thanksgiving would be celebrated on the fourth Thursday of November. *** Lincoln put on his bravest face when he suggested in the middle of a war”of unequaled magnitude and severity”that”harmony has prevailed everywhere, except in the theater of military conflict.” The president stressed abundance and unity, invoking memories of holidays past, and striking a chord with the war-torn Union.
(Citations omitted for readability.) The full article is available here.