ANSI is the American National Standards Institute. It is the highest level a standard can attain in the USA. Years ago, ANSI delegated management of pressure standards, includes those for valves, flanges, pipelines, to ASME. So the propoer termonology is actually ASME Class.... However, ANSI was mentioned for so long that it is still mentioned today by habit.
API valve standards define the Class very well:
Class - an alphanumeric designation that is used for reference purposes relating to valve pressure/temperature capability, taking into account valve material mechanical properties and valve dimensional characteristics. It comprises the letters "Class", followed by a dimensionless whole number (i.e. 150, 300, 600, etc.). The number following the letters Class do not represent a measurable value and are not used for calculation purposes except where speficied in the applicable design standard. The allowable pressure for a valve having a Class number depends upon the valve material and its operating temperature, and is found in the ASME B16.34 tables for pressure/temperature ratings. Use of Class ratings is applicable to valves using NPS size designations.