Gabriel Attal, 34, is a new kind of French prime minister, more inclined to Diet Coke than a good Burgundy, at home with social media and revelations about his personal life, a natural communicator who reels off one liners like “France rhymes with power” to assert his “authority,” a favorite word.

Since taking office in early January, the boyish-looking Mr. Attal has waded into the countryside, far from his familiar haunts in the chic quarters of Paris, muddied his dress shoes, propped his notes on a choreographed bale of hay, and calmed protesting farmers through adroit negotiation leavened by multiple concessions.

He has told rail workers threatening a strike that “working is a duty,” not an everyday French admonition. He has shown off his new dog on Instagram and explained that he called the high-energy Chow Chow “Volta” after the inventor of the electric battery. He has told the National Assembly that he is the living proof of a changing France as “a prime minister who assumes his homosexuality.”

France does budge, but whether it is ready for the control-the-narrative politics of emotion and distraction that Mr. Attal embodies is an open question. Time is short. The prime minister’s mission, as conceived by an embattled President Emmanuel Macron, is clear: reverse the ascendancy of the far right of Marine Le Pen ahead of European Parliament elections in June and a French presidential election just over three years from now.

Mr. Macron is term limited and must leave office in 2027; the specter that haunts him is Ms. Le Pen as his successor. In Mr. Attal, he hopes to cultivate one of his own.