On the night of Jan. 21, Mitt Romney came to the realization that he was in serious trouble. Newt Gingrich had just trounced him in the South Carolina primary, and Romney, who had tried to portray himself as the inevitable Republican nominee, was suddenly one-for-three after contests in Iowa, New Hampshire and the Palmetto State. The hugely important Florida primary was next, Gingrich was on a roll and if Romney did not recover, his entire campaign might be in jeopardy.

Romney's first priority was to do a better job in Republican debates. He had turned in perfectly serviceable performances in most of them, with the exception of a few memorable gaffes. (Remember that "$10,000 bet" moment with Rick Perry?) But Gingrich was widely seen as dominant in several of the earlier Republican face-offs and had scored big points with conservative audiences by challenging and, in some cases, demolishing the debates' high-profile media moderators.

There would be two GOP debates in Florida, one in Tampa and one in Jacksonville. Coming off defeat in South Carolina, Romney had to raise his game.

He did. Particularly in the Jacksonville debate, Romney seemed like a new man. He deftly and confidently ripped Gingrich over accusations that Romney had investments in Fannie Mae and Freddie Mac, and then ran circles around Gingrich on immigration. With nearly everything at stake, and big audiences watching in the biggest primary state, Romney shone.

Looking back today, Gingrich concedes Romney got the better of him in those two critical debates. "He obviously had new coaching on being more aggressive," Gingrich recalls. "His style had moved very strongly toward being more aggressive and to stand and fight, as opposed to hit and move back."

Romney's performance was the result of an emergency change in course after South Carolina. Romney's opposition research team -- his campaign is actually run by a former oppo researcher -- went into high gear, looking for anything to use against Gingrich. They discovered Gingrich had investments in funds that held shares of Fannie Mae and Freddie Mac, so when Gingrich accused Romney of connections to those two scandal-ridden organizations, Romney hit back hard. That success was the direct result of doing more homework.

More debate prep, too. In previous debates, Romney's staff would often say, half seriously, that he prepped them, not the other way around. Debate preparation sessions were mostly informal conversations. That changed in Florida. Romney retained a new debate adviser, Brett O'Donnell, who had worked for the Bush-Cheney ticket in 2004 and for Michele Bachmann in '12. Gone were the gaffes, replaced by a far sharper presentation.

Romney went on to win Florida in a landslide, putting him on the road to the nomination. After that, the importance of the debates waned. The last was held Feb. 22, shortly before the Michigan primary. Romney won that one, too.

Now, it's been more than seven months since Romney took part in a debate. But he is again in a tough spot. Time is running out, and he's behind the president in both national and key-state polls. He's taken a beating, from the press and from some on his own side, over his "47 percent" comments. And he has struggled to overcome the effects of months of attack ads run against him in Ohio and other critical states.

Romney's biggest challenge, as Gingrich sees it, is to deal with what Gingrich believes will be Obama's repeated misrepresentations of Romney's record and position. Back in January, Gingrich believed Romney misrepresented Gingrich's own record, something he still believes today. "Now, Romney has to figure out with Obama what I failed to figure out with Romney," Gingrich says. "How do you convince the audience that the plausible thing just said by your opponent is factually false?"

In the Florida race, other factors, most notably an incredible barrage of attack ads, contributed to Romney's comeback. But the debates were key. If Romney had flopped in them, it's possible that all the ads in the world wouldn't have done much good.

Now, the debates are even more important. In the primaries, a candidate could lose one week and come back to win the next. But in the general election, everything leads to Nov. 6. Romney has just one chance to win the first debate. Later presidential debates, on Oct. 16 and Oct. 22, will probably be less important than that first impression.

The most important thing Romney could do for himself is to remember that feeling from the night he lost South Carolina, when he realized that everything was riding on his next performance. This time, it is.

Byron York, The Examiner's chief political correspondent, can be contacted at byork@washingtonexaminer.com. His column appears on Tuesday and Friday, and his stories and blog posts appear on washingtonexaminer.com.