Because the North Vietnamese Navy attacked the United States Navy upon the high seas in the Tonkin Gulf. Back in the old days that used to be an act of war.
Johnson did escalate the war by using the Gulf of Tonkin Resolution to commit regular US forces and the forces of five other nations, instead of US volunteers only. Perharps the question is asking...