Paire was ahead 2-1 in the first set when Tomic ended it.
''I was feeling bad all night,'' Tomic said. ''I couldn't play with the heat. I felt so, so bad and I felt like I was going to collapse. It was the best thing for me to do to retire. ... The main thing is to get it out of my system.''
The retirement comes less than a week after the young Australian was widely criticized for giving up on match point in a loss at the Madrid Open. Facing Fabio Fognini, Tomic turned his racket around when facing three match points and with the handle facing forward, he only watched as the ball bounced for an ace.
Paire, a Frenchman, next faces fourth-seeded Stan Wawrinka.
In other matches on the red clay at the Foro Italico, 12th-seeded David Goffin of Belgium rallied past Leonardo Mayer of Argentina 2-6, 7-6 (8), 6-3 and 16th-seeded Kevin Anderson of South Africa beat Feliciano Lopez of Spain 6-4, 7-6 (5).
Also, Juan Monaco of Argentina defeated Steve Johnson of the United States 6-4, 6-4; Albert Ramos-Vinolas of Spain eliminated Sam Querrey of the United States 6-4, 6-4; and Viktor Troicki of Serbia beat Teymuraz Gabashvili of Russia 6-4, 6-1.