Berangkat = use it only when you're at the beginning of your trip.
Pergi = use it anytime before you arrive at your destination.
You: Mom, I am berangkat to school now
On the road, before arrive at school, your grandpa calls you on the phone:
A: Where are you? Are you home?
You: No. I am now pergi to school.
Angkat (root form) means lift. It can be prefixed with two prefixes: ber- and me-. It then can be derived:
mengangkat (transitive): to lift, to move something upwards
berangkat (intransitive): to leave for, to start going to somewhere
I'm not sure about why "berangkat" means to leave for, but it might originally mean something along the lines of "to lift oneself from one place to another" or "to lift one's baggage to somewhere", thus "to leave for".