Hi Pratik, Yes, APSRTC runs direct buses to Jammalamadugu from Bangalore. After reaching Jammalamadugu you can take a local bus to Gandikota as well. You can read more about Gandikota trips here: https://goo.gl/K3XVqS Keep exploring!
Yes, there are local buses connecting Gandikota and Bangalore. The roads are smooth and I recommend leaving early morning for a comfortable ride. We drove from Hyderabad. We left around 4 am and reached by noon. You can also consider traveling by train.