Anyway, while Polk often gets credit for Texas, it was John Tyler who really took up the cause of Texas and threw himself into getting it admittance into the Union:
Like other southern sectionalists, Tyler knew that the South was falling behind the North in both population and prosperity. The annexation of Texas would be a tremendous shot in the arm for the South and a political masterstroke that could revive his prospects to remain in the White House.
Tyler’s first attempt to get involved in the Texas issue came in 1843, when the president offered his services to Mexico as a mediator in the ongoing dispute over Texas. Under Tyler’s tripartite plan, Mexico would acknowledge Texas independence and cede the port of San Francisco to the United States. Great Britain would pay Mexico for the cession and receive the Oregon Territory from the United States in return. But like most of Tyler’s plans, the tripartite agreement never went anywhere. Neither Britain nor Texas was impressed, and Mexico openly threatened to go to war with the United States if Tyler pursued the matter.
If Great Britain, as her philanthropists and blustering presses intimate, entertains a design to possess Mexico or Texas, or to interfere in any manner with the slaves of the Southern States, but a few weeks we fancy, at any time, will suffice to rouse the whole American People to arms like one vast nest of hornets. The great Western States, at the call of ‘Captain Tyler,’ would pour their noble sons down the Mississippi Valley by MILLIONS.
—editorial in the Madisonian newspaper, Washington, D.C., June 24, 1843
Tyler was forced to back off— temporarily. He still believed that annexation was the key to invigorating both the future of the South and his own political career. For most of the year, Tyler and his supporters waged an underground campaign to sway public opinion in favor of Texas annexation. Even as Sam Houston gave up on the United States in despair and opened serious negotiations with Great Britain, Tyler and other southern conservatives were arguing in editorials and privately circulated letters that Texas annexation would protect Southern interests by balancing the population of North and South, increasing Southern representation in Congress, and saving slavery in Texas from certain abolition by the British.
As 1843 drew to a close, Tyler and his secretary of state, Abel Upshur, realized that the hour was growing late on the Texas issue. Upshur, a brilliant jurist and staunch southern conservative, was even more alarmed than Tyler by the prospects of losing Texas to the British. In the short run, Upshur warned, a free Texas would attract runaway slaves, resulting in a constant border war with the South. In the long term, Britain would develop Texas into a cotton kingdom. The Southern economy would be wrecked, and the North would be severely affected by the loss of markets for its goods and the end of the cotton trade for its ships.
But the dire consequences didn’t stop there. Under Upshur’s doomsday scenario, bankrupt Southern planters would be forced to free their slaves. The Southern planter society so beloved by himself, Tyler, and like-minded allies would crumble. The North, too, would never be the same. Impoverished blacks would stream to northern cities in search of work, with inevitable riots and death.
With Tyler’s blessing, Upshur approached Isaac Van Zandt, the Texas chargé d'affaires in Washington, to reopen the topic of annexation. Van Zandt told him that he been instructed by President Houston to drop the matter while Texas pursued an alliance with Britain. But Upshur was insistent. President Tyler wanted to open talks with Texas. The aim: a treaty to annex Texas to the United States as a territory.
You can continue this story at the link above. It was Polk's election in 1844 that allowed Texas to get through Congress:
In the interim between Polk’s election and his inauguration (then held in March), supporters of annexation worked on new political tactics to avoid a repeat of Tyler’s treaty debacle. One of their chief ideas was to balance the annexation of Texas with the admission of Oregon as a non-slave territory. The other was to engineer annexation via joint resolution of both houses of Congress, a strategy that required only a majority in both houses instead of the two-thirds vote needed for a treaty.
One thing that had changed since the Tyler treaty was the reduction in partisan rancor. Whigs were eager to leave the disappointment of the Clay defeat behind and jump on the bandwagon of the popular Texas issue. There was less talk of the evils of slavery and war with Mexico and more talk about western expansion and economic opportunity.
Opponents of annexation were still busy keeping their objections before the public. Texas owed more than $10 million (almost $200 million in 2006 dollars). Supporters had proposed that Texas sell its public lands to pay off the debt, but opponents pointed to greed and corruption, demonstrating that land speculators who had already snapped up the worthless land now stood to make a killing. Others objected to the huge size of Texas, saying that if the state ever gained population in proportion to its size, it could dominate Congress.
But with the election of Polk and the disintegrating unity in the Whig ranks, annexation now seemed a question of “how” and “when” rather than “if.” Several draft joint resolutions were put forth, but in January 1845, Representative Milton Brown of Tennessee introduced the bill that became the final basis for the annexation of Texas. The Brown resolution eliminated the debt issue by stipulating that Texas would keep its public lands in order to eventually pay its own way out of its debt. In addition, Brown’s bill provided that Texas could be divided into several states as needed to deal with future “balance” between slave states and free states, and that no slavery would be allowed north of the old Missouri Compromise line. The Brown bill easily passed the House of Representatives on January 25, 1845.
February 1845 was an intense period in the United States Senate. Both supporters and opponents of annexation could be accused of grandstanding. Opponents mounted a passionate last-ditch attempt to stop passage of the bill that almost succeeded. The Senate Foreign Relations Committee recommended that the Brown bill be rejected. After days of debate and compromise, the matter came to a vote on February 27. The result was a 26-26 tie. At the last minute, a Louisiana senator was persuaded to change his vote, and Texas annexation passed the Senate by a single vote.President Tyler signed Texas into statehood just days before leaving office.