If your Macbook trackpad is not working, the last thing you suspect might be your battery. But that is exactly what happened to me. My trackpad symptoms were several. Initially the clicks didn't register and later clicking itself became harder. After that just trying to move the cursor will freeze the Macbook requiring a complete restart. The trackpad button also behaved as if it was permanently in a clicked position. The trackpad kept clicked in is the emergency CD/DVD eject procedure. So if you have this problem you won't be able to boot from CD/DVD.
I worked around these problems by disabling trackpad in preferences when an external mouse is plugged in (System Preferences > Trackpad -> Ignore trackpad when mouse is present). I had to be very careful while logging in since the trackpad was still enabled in the Login screen even if an external mouse was present. These temporary fixes worked fine but it did make my life painful in situations where using an external mouse was difficult. The Macbook was barely two years old and replacing the top panel was the often suggested fix in online forums. But it was an expensive solution and I didn't want to spend a fortune on fixing a problem that was not that big a problem most of the times.
It turns out, I was looking in the wrong area. Two months after the trackpad problems started, the Macbook battery began to bulge. Thinking that I may have put it in wrongly when I last took it out, I took out the battery and tried to put it back. Ooops..Bad idea! The battery would not go in smoothly and I would have had to use excessive force to force it into the compartment. I didn't try to force it as I feared that it might break something. If I held the battery on place, I was able to use the battery but of course that is not something practical. I also feared that the battery had gone bad and since Li-ion batteries have a tendency to explode, I didn't want to risk using an obviously deformed battery.
This forced me to use the Macbook without the battery for a month and half (the long duration was due to non availability of Macbook batteries in my city). Once I took out the battery, the trackpad started functioning without any problems. I could move the cursor, click and drag without the Macbook ever freezing and without exerting undue force. Hence the obvious conclusion was that the bulging battery was pressing on the trackpad circuits leading to all kinds of weirdness. So if you face any trackpad issue at all, remove the battery and see if the problem persists.
If you are lucky enough, the bulging battery will be replaced free of charge by Apple but I had no such luck in India.