How can a battery charge up another battery to a higher percentage? Say I have my phone on 5% and a large battery pack on 35% and I charge the phone. By the end the phone is on 100% and the pack is on 12%.
How can the battery pack charge the phone up to a higher percentage of its current charge? 
I would expect that the phone would stop charging when the percentage on the power pack was equal to the percentage on the phone, but clearly it doesn't, so what's happening?
 A: For an iPhone the battery voltage is a nominal 3.8 V and the battery pack would probably replicate the 5 V output voltage of a USB power supply.
So the battery pack would be discharged as it was driving current into the positive terminal of the phone battery and thus recharge the phone battery.  
So only when the battery pack voltage was less than the phone battery voltage would the phone battery not be recharged.
As an approximation in terms of battery capacity $C$ mAh
$(100-5)C_{\text{phone}} = (35-12)C_{\text{pack}} \Rightarrow \dfrac{C_{\text{pack}}}{C_{\text{phone}}} \approx 4$
It really should be done in terms of energy but the recharging process will not be 100% efficient.
$3.8 (100-5)C_{\text{phone}} = 5 (35-12)C_{\text{pack}} \Rightarrow \dfrac{C_{\text{pack}}}{C_{\text{phone}}} \approx 3$
A: Voltage is not any part of this explanation. The answer is that each battery pack stores a certain amount of energy. This is measured in joules.
At its most basic level your phone battery has a certain capacity in joules, you external battery bank also has a capacity in joules. When you charge the battery you are transferring a certain number of joules from one battery to another.
The physical analogy is pouring water from a bucket into a mug. If your bucket holds 5L and you cup holds 500mL you will be able to fill your cup 10 times.
The bit that seems to be being focused on with the voltage levels of the two batteries is not relevant with modern electronics. A switch-mode power supply (a bit like a transformer for DC instead of AC) can convert from a low voltage to a high voltage. There are losses in this so you may only be able to fill your 500mL cup 9 times with one cup being lost to various losses (predominantly restive and switching)
The mechanical analogy still holds up and we have been able to build devices that can pump water to a higher potential for at least a few hundred years. See Wikipedia Ram Pump. The idea being you can take the potential energy out of some volume of water and add that energy into a different volume of water. This is the general principal behind switch-mode power supplies but inefficiencies are typically much higher than the mechanical system. These two videos might help provide a more intuitive feel for how this works and are an interesting watch video 1 video 2

Edit:
I somehow missed Peter Cordes's answer which states this more eloquently, I will still leave this here as looking into ram pumps is a good way to wrap your head around it.
A: Sometimes it is easier to understand circuitry in the context of water.  What you're imagining is two tanks of water of equal size linked together by a pipe that has been sealed off.  If one tank holds 5% water and the other holds 35% water, when you remove the seal, the tanks equalize and you end up with 20% in both tanks.
What you're forgetting is that like batteries, water tanks come in varying capacities.  A large battery pack "water tank" is more equivalently like a tank 4 times the size of the phone "water tank".  When you release the seal, the phone water tank is filled easily and the source, the battery pack water tank still has plenty of water.  Charge works similarly, except you cannot "see" charge like you can with water in a water tank.
So what happens when you have a large tank with water at the same level as the smaller tank?  Despite the larger tank holding more water, since they are at the same water level, they are at equilibrium and so one doesn't "charge" the other.  Likewise a sufficiently uncharged battery, even with plenty of capacity, can have low charge and not charge the phone.  
Hope that explains it.
Edit:  In light of several comments, perhaps it would be imprecise to imagine two tanks one next to the other, but rather it would be more accurate to imagine the large battery tank on top to fill the phone battery tank below, since potentially all of the charge could transfer from the large battery pack to the phone battery. 
A: The key here is the voltage of both the batteries. The battery in the phone is generally at a voltage of 3.7V. The battery pack has a higher voltage or a circuit which gives a voltage of 5V to your phone. So, as long as the voltage with which you charge the phone is higher than that of the battery, the percentage of power in it doesn't matter and the phone charges up.
A: Connecting your phone to the battery pack doesn't directly connect the cells in parallel.  I assume this is where your guess of an equilibrium with equal voltage -> equal charge percentage comes from.
Shorting lithium-ion / lithium-polymer (LiPo) cells together like that would likely cause one or both to literally catch fire from the high currents, or from overcharging / over-discharging.  (Circuitry to prevent over-discharging even if the charging cable is shorted out is absolutely essential).
There are some links to youtube videos of lithium battery fires on a recent electronics.SE question about designing your own charger.  (TL:DR: it's way the hell too dangerous to consider doing for a homebrew design, because Lithium cells need a LOT of protection circuitry to be mostly safe.)

So the whole idea of connecting cells together and letting their voltages equalize "naturally" is just completely not viable for modern batteries.
Chargers use DC-DC switching power supplies to charge at constant current. They use inductors to efficiently convert to a different voltage (higher or lower).  (For example, to produce a lower voltage, see this detailed explanation of a buck converter doesn't use a transformer, just an inductor.  Also a discussion of multi-phase buck converters used on computer motherboards.)
In the water analogy, where water represents charge and pressure represents voltage: A converter is like a pump that can move charge from a lower reservoir to a higher reservoir.  (voltage = pressure = gravitational potential energy (per unit volume / charge).)  A small fraction of the energy transferred is lost to inefficiencies in the conversion.  (Maybe a couple %, IDK).

Since the capacity of the external battery pack is larger than the capacity of the phone's battery pack, it should be obvious that moving charge from the large reservoir to the small reservoir can take the phone battery from 5% to 100% while only dropping the battery pack from 35% to 12%.  I don't think this is what the question was really about.

Just to make it even more obvious why batteries aren't just connected together to equalize:  Some batteries may have multiple cells in series instead of one large cell.  This is typically for physical design reasons, more than to get a higher voltage, because DC-DC converters will be used anyway to produce supply voltages in the 1 V to 2 V range to power most electronics.
Since Lithium cells are so finicky and dangerous, wiring them in parallel instead of series is unwise.  One cell could end up taking most of the current.  So instead, they're wired in series with circuitry for each cell to bypass it before it overcharges or undercharges.
The power transfer between phone and battery pack happens over a USB cable, which runs at 5 V.  (Or, with USB power delivery signalling, the device being charged can signal that it can accept up to 20V, allowing for higher power at the same current to reduce resistive losses and allow faster charging without exceeding safe current limits for the cable / connectors.)
A: In case of the battery packs, there is much lighter weight requirement, and also much smaller development / manufacturing costs. But it is important to be bigger (in the sense of Ah).
If you fill a cup of tea from a large jug, the cup will be full (100%) while the tea level in the jug decreases only a little bit.
The Ah capacities of the batteries are nearly always written on their box, even in the case of your phone and also in your battery pack.
A: I may add a little bit of chemistry in the hope that it would be of some use to the physicists and engineers discussing the charging process of cell phone batteries using backup power source batteries.
Betteries are devices that transform chemical energy into electrical energy and vice versa. The so-called secondary batteries operate in both directions while primary batteries operate only in one direction (they are use and throw type, and cannot be charged). Here, we are concerned with secondary batteries which can be taken through charge-discharge cycles several times.
When a battery works chemical reactions occur. When the reactions occur spontaneously, the battery works as a source of electric power. It can produce light if used in a torch, drive a fan, OR even charge another battery.
These reactions are associated with certain values of electric potentials. The positive and negative terminals are associated with different reactions and so different values of potential. The difference in the potentials is the voltage of the battery. As the battery works, the reactions occur and the potential difference remains constant (ideal battery) because the reactions remain the same. However, its capacity changes - the capacity decreases as it drains. and the capacity builds up as it is charged (all at constant voltage, for an ideal battery).
Thus, the essential difference between the water flow charge-discharge and the charge-discharge of a battery is this: when the water flows out or in, the water level in the container changes; however, in the case of battery the voltage does not change (assuming ideality, in reality- it does change.
It is a mistaken notion that charge flows into a battery when it charges, and charge flows out when it discharges. CHARGE ONLY CIRCULATES IN A BATTERY, DOESN'T FLOW IN OR OUT!
Energy capacity (watt-hour capacity) of the back up source is much larger than that of the cell battery.
In cell battery, energy is transformed from chemical to electrical to heat, during discharge and electrical to chemical during charge while in the backup power battery, energy is transformed from chemical to electrical when it charges the cell battery and electrical to chemical when it gets itself charged from mains supply.
Hope this adds to the useful information already contained in the earlier discussions. 
P. Radhakrishnamurty
A: The main question is unnecessarily complicated by alluding to a phone battery and its battery pack.  Concentrating strictly on two "plain" batteries, one being charged to 5% of it capacity and the other charged to 35% of its capacity.  The implication is that the one with the larger charge can charge the one with smaller charge.  This is not necessarily true.  It depends on which battery has the higher voltage!
In order to charge a battery, it must receive a higher voltage than its current voltage.  For a Li battery, it is fully charged when its "no load" voltage is 4.2v and it is 5% charged when the same voltage is 2.8v.  
If you use a 12v car battery (even if only charged to 35%), you will likely cause the Li battery to explode (or at least get very hot).  
If you use a 5v battery (at 35%), the Li battery will be charged to 4.2 volts (100%) and the extra .8v will be used up due to normal inefficiency.  
If you use a 2.8v battery (even if 100% charged), you will not be able to charge the Li battery at all!  
