On April 6, the US declared war on Germany. The vote was 90-6 in the Senate, and 373-50 in the House. The increase in U-boat activity by Germany; combined with the interception of the Zimmerman telegram, promising Mexico it would regain part of the United States if it entered the war on the German side; precipitated the fianl American decision to go to war.
When World War I broke out the United States had vowed to remain neutral. Wilson had hoped to negotiate a peace accord between the Allies and the Axis powers, but Wilson natural sympathies were with the Allies suspicious of Germany which was not a democracy. The sinking of the Luisiantana impacted American public opinion but not enough to create a push to go to war. When Wilson ran for reelection in 1916 one of his major themes had been that he had kept the United States out of the war.
The United States had become in the course of the war the primary source of armaments for the British and the French. The Germans had concluded that they had to cut off that source. They thus planned to resume unrestricted submarine warfare in the Atlantic, something that the US administration had warned them not to do. In parallel to their decision to engage in unrestricted submarine warfare, the German reached out to Mexico. In a telegram that became known as the Zimmerman telegram named after the German Foreign Secretary who had sent it, the Germans offered an alliance with the Mexican. The Germans promised to help the Mexicans regain the territory lost to the United in 1848 (California, New Mexico, and Arizona). The British intelligence intercepted the telegram and shared it with the US government. The US government released the telegram which inflamed many Americans against the German.
In January 1917 the Germans began their policy of unrestricted attacks on neutral shipping in the war zones. In March the German sunk five American ships. Together with the Zimmerman telegram, the US public was ready to go to war with Germany. On April 2, 1917, President Wilson spoke before a joint session of Congress. On April 6th the Congress declared war on Germany. The vote in the Senate was 82 to 6 and in Congress 373 to 50.