I believe you are incorrect. Your vision of the Roth IRA rules essentially destroys the benefit of a Roth IRA over a traditional IRA. The hallmark of the Roth is that your distributions are tax free if you take them out at retirement. The government (as i read the IRS rules below) would not assess a capital gains tax nor income tax on the value of the Roth IRA. The government is ok with it since the money you poured into the Roth has already been taxed as ordinary income (which you correctly pointed out) -- and because there are yearly contribution caps to the account and it is to be used for retirement.
There are exceptions however to this. Essentially the IRS defines only "qualified distributions" to be tax free from an IRA. Distributions are essentially payouts from the IRA that are either: principal (i.e. your contributions), conversion principal (say you rolled a traditional IRA into this Roth) or earnings on principal.
The rules that make a distribution tax free are as follows:
1. It is made after the 5-year period beginning with the first taxable year for which a contribution was made to a Roth IRA set up for your benefit, and
2. The payment or distribution is:
1.Made on or after the date you reach age 59½,
2.Made because you are disabled,
3.Made to a beneficiary or to your estate after your death, or
4.One that meets the requirements listed under First home exception
Bottom line, if you stick to the conventional wisdom of not touching your Roth IRA (i.e. no withdrawals) until retirement or disablement -- withdrawals from the account ("distributions") would be deemed "qualified" and thus would be tax free.
My source is the IRS info here:
http://www.irs.gov/publications/p590/ch02.html#d0e10519
In answer to the OP's question -- any withdrawal from the Roth would be subject to the "qualified distributions" rules --- so if you withdraw the capital gains say two years after you start your Roth, it is by definition not a qualified distribution (violates 5 year rule) and you owe capital gains tax on it (it would not be federal tax since it is not earned income).
Totally open to discussion....i may have goofed and misread/misinterpreted the info at the URL....