The US came to Beijing ranked ninth in the world
The US will meet Hungary in the final of the Olympic water polo on Sunday after both won their semi-finals.
US goalkeeper Merrill Moses stopped 16 shots as the US beat Serbia 10-5, while the Hungarians beat Montenegro 11-9 in the other semi-final.
The US came to Beijing ranked ninth in the world, and few gave them a chance of progressing beyond the group stage.
"It's hard to describe in words what it feels like," US player Jeff Powers said following the team' victory.
"You set goals and once you reach that goal, you've got to keep going, right? The new goal is a gold medal. Let's go get it. Let's change history."
Montenegro - which split from its union with Serbia in 2006 - will play off with Serbia on Sunday for the bronze medal.