You will have to take the course at UCSB if you don't take it at your community college.
This what they they say about prerequisite GPA:
"In order to qualify for admission into the Economics and Accounting major, students must complete Economics 1, 2, 3A, 3B, and 10A with a UC grade-point average of 2.85 or above. No grade lower than C in pre-major courses will be accepted. In addition, students must complete PSTAT 5E, Math 34A-B, and Writing 105AA-ZZ or 107AA-ZZ or 109AA-ZZ with a grade of “C” or higher; the grades in these courses will not be used in computing the pre-major GPA but will apply to the overall major GPA."