INDIANAPOLIS — As Senator Ted Cruz of Texas seeks every possible edge to stop Donald J. Trump, he has seized on a once-obscure issue with a proven power to inflame conservatives: letting transgender women use women’s bathrooms.

Mr. Cruz mentions it constantly in Indiana, a state with many social conservatives that is all but a last stand for him in his fight to deprive Mr. Trump of the Republican presidential nomination.

With polls showing a narrower lead for Mr. Trump in Indiana than in the five Eastern states that he swept on Tuesday, the Cruz campaign’s private polling indicates that the bathroom issue has the power to help close the gap. Moreover, it is fresh in Indiana voters’ minds because of high-profile battles in the state in recent years over gay rights.

“Donald Trump and Hillary Clinton both agree that grown men should be allowed to use the little girls’ restroom,” Mr. Cruz said on Tuesday night as a crowd in Knightstown, Ind., booed heartily. He made the remarks after coming before the crowd with his two daughters, 7 and 5, who wore matching pink dresses.