Did you add the RAM or someone outside of Apple? You need to check the foam behind the RAM door. If it is pinched and sticking out some, it may impede the battery from fitting into the proper position.
If that's the case, loosen the RAM door screws with a #0 phillips, tuck the foam in with a thin card (playing card works well), and then tighten the screws back up. When you're done, you shouldn't see any foam protruding from the top of the RAM door. Now try the battery and latch.
Here is a link with a clear picture of exactly what I mean. Under the heading *Replacing a MacBooks Harddrive* see
#5 the *second picture and caption*.
http://www.macinstruct.com/node/130
Hope this helps.