Grams appear for a recipe only when every ingredient carries weight information in grams or ounces. Some vendors never publish a weight, so the app cannot calculate one. Enter an approximate weight for the whole recipe yourself while you create or edit it, and describe its total serving at the same time.
To display "grams" for the recipe itself, the system requires that all ingredients include weight information in either grams or ounces. Alternatively, enter the approximate weight value for the whole recipe while creating or editing the recipe and specifying its total serving.