I worked part time for part of the year, and earned less than the maximum contribution amount, so I can only contribute up to the amount of my income. Which income number is that? Gross pay, net pay, or something in between (depending on deductions like taxes, retirement plan contribution, other benefits)? If I worked 400 hours at $12/hour, can I just contribute $4,800, or do I need to account for anything else?
Publication 590-A covers how much you can contribute to IRAs. Specifically, in the section for Roth IRA contribution limit if you contribute to Roth IRAs only, it says that the limit is the lesser of $6000 or your "taxable compensation". The definition of compensation is covered in the section What is Compensation? Wages is considered compensation, and it would be the amount before tax or other withholdings.
Earned income can be contributed to a Roth IRA, so it would be your gross income, meaning before taxes, insurance, benefits, deductions, etc.
A better, non-authoritative description can be found here:
What Is Qualifying Earned Income?
The Internal Revenue Service defines what is earned income for the purposes of qualifying for Roth IRA contributions. Income from wages, salaries, tips and other forms of taxable pay when working for someone else are earned income. Self-employment income also is earned income. Union strike benefits and long-term disability payments received before you reach retirement age round out the list of types of income that qualify you to make Roth IRA contributions.
Nonqualifying Income Examples
Income that is not earned does not qualify you to contribute to a Roth IRA. Examples of this income are retirement pensions, Social Security payments, interest and dividend income, unemployment benefits as well as alimony and child support. Unemployment benefits are also not considered earned income.