Lotta Schelin beat goalkeeper Hope Solo with a header in the 24th minute. The U.S. had been 36-0-7 since a 1-0 loss to Japan at the Algarve Cup on March 5, 2012, and 16-0-4 under Tom Sermanni, who took over as coach after Sundhage left in 2012 to lead her native Sweden.
The U.S., which was eliminated from contention for the title, had a chance to take the lead in the 15th minute, but Abby Wambach's penalty kick was pushed past a post by goalkeeper Hedvig Lindahl after American midfielder Amy Rodriguez was fouled.
"You're always going to lose games in football. That's how it works," Sermanni said. "Sometimes you win games that perhaps you should have lost. Sometimes you lose games that perhaps you should have won. But as I said, today we missed a penalty at nil-nil, and in the last 15 minutes we had four very good goal-scoring opportunities. And if you don't take those, that makes a difference."
Sweden (2-0) leads Group B with six points, two ahead of Japan, which defeated Denmark 1-0. The U.S. (0-1-1), which had won the tournament nine times in 18 previous trips, has one point heading into its Group B finale against Denmark (0-2) on Monday.
Sisters Samantha and Kristie Mewis entered in the 68th minute, with Samantha making her national team debut.
Kristie Mewis forced Lindahl into a leg save on a break in the 83rd minute, and five minutes later the goalkeeper came off her line to make a chest save on Hagen.
"It felt great to get in," said Hagen, a 24-year-old forward with Bayern Munich. "I had a few opportunities that I wish I would have been able to finish."
The Americans, who opened with a 1-1 tie against Japan, were without forward Alex Morgan, who is sidelined with an ankle injury.
Wambach was active at the start but the early opportunities were lost. Then Sofia Jakobsson blocked Ali Krieger's clearance attempt and sent in a cross that Schelin headed past Solo.
"This was a tough one," American defender Christie Rampone said. "We definitely had more of the ball, not necessarily the best possession we could have played with, but we definitely made Sweden defend a lot. And credit to them, they kept fighting and battling and cutting off the passing channels and blocking shots."
NOTES: Germany (2-0) is virtually assured of advancing to the final from Group A after beating China 1-0. Iceland defeated Norway 2-1 in the other Group A match.