Temperature and Heat are two different things.
A body, such as the surface of the Earth, radiates electromagnetic radiation. As the temperature increases, the wavelength of the radiation decreases.
The Sun is a very hot body and gives off short wave electromagnetic radiation.
This penetrates the Earth's atmosphere, with little absorption, and heats up the ground. The warm ground gives off longer wavelength raiation (infrared) which is easily absorbed by atmospheric molecules such as carbon dioxide, methane and water.
An increase in pressure of a gas will increase the number of radiation absorbing molecules and hence increase the degree of absorption.