basis in Roth IRA contributions

I closed my Roth IRA (around $5K) last year b/c I needed the money.  I am under 59 yo. and now doing my taxes, it seems I am getting taxed for all of this money.
Does basis in Roth IRA contributions mean how much money I took out that I had at one time deposited into the Roth IRA?  So I'll only get taxed for what I made?