The IRS defines income quite specifically.
On the topic What is Taxable and Nontaxable Income, they note:
You can receive income in the form of money, property, or services. This section discusses many kinds of income that are taxable or nontaxable. It includes discussions on employee wages and fringe benefits, and income from bartering, partnerships, S corporations, and royalties.
Bartering, or giving someone wages (or similar) in something other than currency (or some other specifically defined things, like fringe benefits), is taxed at fair market value:
Bartering
Bartering is an exchange of property or services. You must include in your income, at the time received, the fair market value of property or services you receive in bartering. For additional information, Refer to Tax Topic 420 - Bartering Income and Barter Exchanges.
Bartering is more specifically covered in Topic 420 - Bartering Income:
You must include in gross income in the year of receipt the fair market value of goods or services received from bartering. Generally, you report this income on Form 1040, Schedule C (PDF), Profit or Loss from Business (Sole Proprietorship), or Form 1040, Schedule C-EZ (PDF), Net Profit from Business (Sole Proprietorship). If you failed to report this income, correct your return by filing a Form 1040X (PDF), Amended U.S. Individual Income Tax Return. Refer to Topic 308 for information on filing an amended return.
More details about income in general beyond the above articles is available in Publication 525, Taxable and Nontaxable Income. It goes into great detail about different kinds of income.
In your example, you'd have to calculate the fair market value of an avocado, and then determine how much cash-equivalent you were paid in. The IRS wouldn't necessarily tell you what that value was; you'd calculate it based on something you feel you could justify to them afterwards. The way I'd do it would be to write down the price of avocados at each pay period, and apply a dollar-cost-averaging type method to determine the total pay's fair value.
While the avocado example is of course largely absurd, the advent of bitcoins has made this much more relevant. Publication 525 has this to say about virtual currency:
Virtual Currency. If your employer gives you virtual currency (such as Bitcoin) as payment for your services, you must include the fair market value of the currency in your income. The fair market value of virtual currency (such as Bitcoin) paid as wages is subject to federal income tax withholding, Federal Insurance Contribution Act (FICA) tax, and Federal Unemployment Tax Act (FUTA) tax and must be reported on Form W-2, Wage and Tax Statement.
Gold would be fundamentally similar - although I am not sure it's legal to pay someone in gold; assuming it were, though, its fair market value would be again the definition of income. Similarly, if you're paid in another country's currency, the US dollar equivalent of that is what you'll pay taxes on, at the fair market value of that currency in US dollars.