"Go back" means "return", and "being friends" is a state. After having a falling out, two people may return to this state. Grammatically, this is the same as how they might return to their home towns after a road trip.
Compare:
*TheThe two went back to London. (bad grammar)
The*The two went back to London. (bad grammar)
It's the same comparison with your two sentences:
go back to being friends
*go back being friends (also bad grammar)
go back to being friends