Querrey rebounded from a break down in each set and 0-3, 2-5 and 5-6 in the tiebreaker before closing out Ram with a running forehand down-the-line pass that clipped the baseline. Ram challenged the call, but the replay showed it caught the outside of the line.
Querrey, who was down a break in six of the 10 sets he won throughout the week, knocked out former U.S. Open champ Juan Martin del Potro of Argentina in the semifinals.
''It was kind of nervous, ugly tennis all week,'' said Querrey, who also reached the semifinals in Memphis last week. ''But sometimes it feels better to win when you don't play your best.''
Querrey earned $86,950. He will also move back into the world's top 45 from a current No. 61. The 28-year-old Californian was ranked as high of No. 17 in January 2011. This was only the second time in the 24-year history of the tournament that two unseeded players met in the final. The last time was 2013.
''People don't give him credit for how well he moves,'' said Ram, who has played Querrey seven times dating to a Challenger event in California in 2005 - losing to him now four times in a row. ''He makes you feel like you have to play a better shot.''
Ram broke serve in the first game of both sets and also led 40-15 while serving at 4-5 in the first. But the 31-year-old Carmel, Indiana, resident lost four straight points and gave away the set with a stab forehand long off Querrey's inside-out forehand return that landed on the sideline.
Ram, who had won just two matches in four tournaments coming into Delray Beach, upset second-seeded Bernard Tomic in the first round and fourth-seeded Grigor Dimitrov in the semifinals.
Austria's Oliver Marach and France's Fabrice Martin denied Bob and Mike Bryan their fifth Delray Beach doubles title by upsetting the top seeds 3-6, 7-6 (9-7), 13-11. The Bryans held a match point in the second-set tiebreaker and five more in the super-tiebreaker before Martin hit a winning overhead on his second match point.