Mr. Colbert’s recent surge is intriguing, in light of the Trump presidency and given the host’s association with biting political commentary from his days on Comedy Central’s “Colbert Report.” For the week of Jan. 16, the week before the inauguration, Mr. Colbert came within 8,000 viewers of tying Mr. Fallon, the closest he had come to his NBC competitor since the week he came on the air. During the week of Jan. 23, Mr. Colbert was in repeats, which threatened to blunt his momentum, but it appears viewers tuned back in last week. Jimmy Kimmel’s ABC show is in third place in both total viewers and among adults under 50.

Mr. Colbert’s show has taken on a political charge in recent months, and it has only accelerated since Mr. Trump won the election. He has been openly critical of Mr. Trump, and last week Jon Stewart, Mr. Colbert’s old late-night partner on Comedy Central, appeared in a scathing segment.

Mr. Fallon, by contrast, has been criticized for being somewhat apolitical and appearing too cozy with Mr. Trump, especially in a September segment when he playfully tousled Mr. Trump’s hair.

Two weeks of data is a small sampling, and the ratings can reverse course at any moment, particularly if these frenetic opening weeks of the Trump presidency show any signs of dying down. Mr. Fallon has been a ratings juggernaut since he took over “The Tonight Show” three years ago, and his lead among 18- to 49-year-olds is no small matter.

But Mr. Colbert’s recent results are a welcome relief to CBS executives. It was only a year ago, after Mr. Colbert had failed to impress with his post-Super Bowl show, that there was concern among CBS executives that his show was adrift.