If your gerbil is scratching at his ear, causing it to bleed, he should be checked by the veterinarian for an ear infection. If he has an ear infection, he will need antibiotics and a pain reliever such as Metacam.
Ear infections can be persistent, taking several weeks to eliminate. They may recur if the gerbil also has a growth in his ear that he likes to scratch. The scratching opens his skin to re-infection.
When an elderly gerbil develops an ear infection, it is sometimes soon afterward discovered that he has an underlying, serious, untreatable condition, such as cancer or organ failure, making his ear infection part of his general decline. However, he should still be treated for the ear infection, as these are quite painful.
A condition associated with ear infections, especially in an older gerbil, is the development of an aural cholesteatoma. A good article on this condition can be found here.