After the world war 2 lots of italian, spanish, portoguese and some french moved to Venezuela. As a business lot of them opened french/portuguese type bakeries (panaderias) where people besides buying bread they could sit and have coffee, eat french pastries, etc. People would hang in the bakeries so, in the 1950's friends hanging around bakeries would say hi by saying, Que paso panaderia! (What's up buddy).
Later in the 1960's and 70's the new generation started cutting the word down to pana so instead of Que paso panaderia! They would say Que paso pana!
And then in the lates 70's and early 1980's thanks to the big soapopera venezuelan business witch exported so many crappy soapoperas to latin american countries words like pana, chamo, burda, malandro started being used by most of the latinamerican countries.