You cannot invert the calculation of pgamma(100, shape=shape, scale=scale) with qgamma because of the limits of precision in the calculation. Any number above about 60, given the shape and scale values you used, returns a pgamma of exactly 1. If you put 1 into qgamma, you get Inf. Look at the result of this modification of your code.
shape=3.5
scale=1.5
x=c(2,5, 60, 80, 100)
pp=pgamma(x, shape=shape, scale=scale)
format(pp, digits = 15)
qgamma(pp, shape=shape, scale=scale)
I used the format() function as a quick way to see more digits in the pp values.