Excess contributions are both. You must have at least as much earned compensation as the total IRA contribution or it is excess AND your MAGI cannot exceed the limits. I have been assuming that you have sufficient income to make the contributions but it is your high income that is limiting it. Perhaps I assumed incorrectly.
"Certainly not interest, dividends, capital gains or any earnings the Roth may have earned. " Yes all of those are part of your MAGI and must be considered.
MAGI is Modified AGI. The Roth contribution limit is biased on AGI Modified by adding other income to it. AGI is all income, not just earned income. Any IRA taxable income on line 15b is added to the AGI, which in turn will increase the MAGI which in turn further limits the Roth contribution limit leading to a endless decreasing loop.
MAGI is what determines the contribution limit - not earned income unless you do not have sufficient income to make a contribution.
<a rel="nofollow" target="_blank" href="
https://www.irs.gov/retirement-plans/amount-of-roth-ira-contributions-that-you-can-make-for-2017">ht...>
See IRS Pub 590A for MAGI
<a rel="nofollow" target="_blank" href="
https://www.irs.gov/publications/p590a#en_US_2016_publink1000230985">https://www.irs.gov/publication...>
**Disclaimer: This post is for discussion purposes only and is NOT tax advice. The author takes no responsibility for the accuracy of any information in this post.**