The Lusitania was important in alienating US public opinion from the Central Powers, but it took place in 1915 and was not the decisive act. The sinking of the Sussex in 1916 led to the Sussex Pledge, whereby Germany agreed not to pursue unrestricted submarine warfare in the future.
This was abrogated in February, 1917 which, combined with the revelation of the Zimmerman Telegram, led to the declaration of war by President Wilson.
A follow up question. When did we come to a consensus that the Lusitania was actually carrying weapons? I assume this was not made known at the time.