Texas trailed 3-1 going into the eighth, but struck for three runs off Glen Perkins (0-1).
On the next pitch, Hamilton sent homer deep into the upper deck in right field, handing the Rangers the lead.
Former Twin Joe Nathan picked up his third save in the bottom of the ninth and Texas won for the eighth time in 10 games to start the season.
Robbie Ross (2-0) racked up a win in relief for the second straight game, tossing two scoreless frames to get the victory.
Twins starter Liam Hendriks yielded only one run on seven hits over six innings.
Thomas socked a two-run homer for Minnesota, which fell to 2-7 on the year.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Kate Middleton recycles dress at movie premiere