The first and only woman to be speaker of the House also was the most powerful and prominent woman in Washington to effectively confront President Trump.