Mr. Netanyahu and Yoav Gallant have repeatedly been at odds over the war in Gaza. But Mr. Netanyahu had avoided firing his rival. Mr. Netanyahu cited “significant gaps” and a “crisis of trust” between the men.