Police say they received a telephone threat ahead of the blast and were able to evacuate the area of Korydallos.
No one was hurt, but windows in the area were shattered and the explosion was heard in Athens. No damage was reported to the prison.
The BBC said no one took credit for the bomb; however, it was considered likely to be the work of left-wing militants angry at the cash-strapped government's new austerity programs. The austerity measures sparked a series of violent protests in the capital in recent days.
Greece has also experienced a scattering of similar bombings.
2014: The Year in Music [PHOTOS]