In the books, the main strength of gondor's outlying fiefdoms and districts are held back in the coastal cities to stave off the attacks by sauron's forces and allies that are attacking there. Minas Tirith only has 7 thousand or so soldiers, a fraction of what they expected to hold the city with.
In the books, aragorn takes the paths of the dead and liberates town by town the provinces that are threatened by these other forces of sauron, using the ghost soldiers to strike fear into those forces of sauron, then defeating them. They then get to the main port city, using the built up force they've been collecting as they go, aided by the ghosts, and then aragorn releaes them.
He then loads all of his human forces (the ones that would/should have been in minas tirith if not for sauron's split attack on gondor), puts them in sauron's allies' boats, and sails up the river to the relief of minas tirith. At that time, the ghosts have been released by aragorn, and they don't help or appear at minas tirith at all.
Even with this new force, the battle is still a tough fight, and eomer and aragorn's reuniting on the battlefield is one of the most epic moments in the series, and it was completely not even in the movies, so very disappointing.