The Scandinavians were three-time consecutive silver medallists at the Games, finishing second at Barcelona, Atlanta and Sydney, but now they aim to go one better when they face either France or Croatia in two days' time.
The victory was underpinned by fast breaks in attack and a solid defence, with Niklas Ekberg taking himself to the top of the scoring chart for the tournament with six goals.
It was a valiant effort from Hungary, who will at least equal their best-ever Olympic finish of fourth, but they could take bronze for the first time in their clash with the loser of tonight's second semi-final.
Both sides came into the match on the back of superb results in the quarter-finals, with Hungary emerging triumphant over pre-tournament favourites Iceland after two periods of extra time, while Sweden saw off European champions Denmark.
It was an even start as both sides traded goals throughout the opening 17 minutes for the score to be tied at 7-7, with Hungary goalkeeper Roland Mikler enjoying himself, saving five of the first nine shots thrown at him.
But Sweden soon found their accuracy in front of goal and a strong final 13 minutes saw them throw in two separate three-goal salvos, which was enough to give them a 15-12 lead at the break.
Ekberg was again the main player for the Scandinavians as he threw in four first-half goals to take his tally to 42 for the tournament, and he continued his hot streak in the opening exchanges of the second period, with two more as the advantage was extended to 21-17.
If Hungary were feeling the effects of a gruelling 80 minutes of action against Iceland just 48 hours earlier, they were not showing it as they threw in three successive goals to bring their deficit back down to one.
Sweden held firm and did enough to restore that cushion to three goals going into the final 10 minutes, but Hungary kept going, backed by a sizeable and vocal following, and brought the score back to 25-26 with 90 seconds to go as a grandstand finish was on the cards.
Kim Ekdahl du Rietz effectively won the game for Sweden when he threw in with 22 seconds remaining to give them a two-goal lead, which did not leave enough time for Hungary to turn it around, though they did add one more.