Why did my ginger garlic paste have a bitter aftertaste?
I see three possibilities based on what you've said:


the germ of the garlic. The germ, or new sprout of the garlic, should be removed before cooking. If your garlic had started to sprout and especially if you left in the germ, this is a possible cause of the bitterness. 
acid. Cooking garlic in an acid environment can cause chemical changes in the garlic, such as turning blue-green or bitter -- as in your picture. Ginger and onions might even be enough to trigger this, or other components of the dish. 
over-cooking the garlic. Though you said you were careful with heat, it's easy to burn garlic just enough to make it bitter.