Are you trying to replace a dead battery? It's likely the battery has swelled so it can't pop out.
Here are few ways you can pull the battery out:
1 - Clean the surface of the battery so any dirt or finger oils are completely removed than get some duck tape creating a pull across the face. The way I do this is place the edge of the tape on one side and lay it down just sort of half way then pulling it up to create the handle. then back down at the halfway point to the other side. Then I take the tape and wrap the pull so the two halves don't pull apart. Un-latch the battery and pull on your handle. If the battery isn't to bad this should work.
2 - When the first method fails - Follow this guide in taking the system apart HD replacement to Step 7 (don't worry about pulling the screws in the battery compartment) as you now have the top loosened up you can try the handle again hopefully the less pressure on the back side of it will allow you to pull the battery now.
OK - Still stuck - Has the battery leaked? then you'll need to use something to break the corrosion as that is the only thing left that could cause the battery from coming out. Here you'll need to use white Vinegar around the gap of the battery and the case. The problem here is the amount you will likely need to use will spill over the logic board which will cause problems!!
WARNING the cure here could kill your system! Once you start you MUST get the battery out and you MUST clean out the remaining vinegar so it does not corrode or damage things any worse than it is now. Use distilled water to wash down the parts and dry them fully. Make sure you have all the needed tools and a couple of plastic basins to dip the parts into to clean off the vinegar (change the water out a few times)