Do gases behave ideally near the critical temperature?

In class, my TA said the closer the temperature of a gas is to the critical temperature, the more ideal it is. I'm struggling to understand this, as I thought more ideal behavior occurs at high temperature and low pressure. I am probably missing something really obvious :(


