Ammonia, a gaseous compound of one nitrogen atom bound to three hydrogen atoms, is not a strong base. It is a weaker base that generally must react with water before it reacts with an acid. Before it neutralizes acids in a solution, it reacts with water to form ammonium and hydroxide ions. Ammonium is a positive ion of one nitrogen and four hydrogen atoms, and it is a weak acid.
All bases work by accepting hydrogen ions, which are just naked protons. This neutralizes acids, since acids work by releasing hydrogen ions to react with other materials. Bases react with these ions more powerfully than other materials, and so they can protect these other materials from the acids. However, bases themselves can be corrosive.
The strongest bases, such as sodium hydroxide, work by dissociating their hydroxide ions in solution. The hydroxide ions react very strongly with hydrogen ions to form water. The other components of the acids and bases often associate as salts. However, ammonia does not contain hydroxide ions. It must first react with water to generate them. Not only does this add a step before neutralizing acids, it is partially counteracted by the creation of ammonium, a weaker acid.