It was the Austrian's second ATP title after winning in Bucharest in 2006. He is now 2-6 in finals.
The 35th-ranked Melzer, seeded seventh, saved five break points to hold serve throughout and broke Cilic three times.
"I can't find the right words to describe my emotions," Melzer said, who has become only the second Austrian winner in the 35-year history of the event after Horst Skoff in 1988.
"I am over the moon. I am very proud to win here," the 28-year-old Austrian said.
Cilic, who is now 2-2 in finals this season, entered the tournament on a wild card after U.S. Open champion Juan Martin del Potro withdrew with a wrist injury.
The Croat is still an outside contender for one of the two open spots at the season-ending ATP World Tour Finals in London later this month.
Cilic looked in control early on. He won seven straight points from the start of the match, but missed three break chances in the second game.
Melzer did not score a point in the Croat's first three service games but broke him at 3-3.
The Austrian saved two break points while serving for the set at 5-4 before Cilic netted a forehand return on set point.
Melzer served flawlessly in the second set, while Cilic missed more forehands from the baseline. He saved two match points before hitting a backhand wide to end the contest.
Melzer also reached the final in doubles. He will team up with Julian Knowle to play Lukasz Kubot and Oliver Marach later on Sunday.