Omitted variables in gravity model
The omitted variable bias in gravity model is an important issue given that some factors are unobserved or difficult to quantity. To solve this issue trade economists tend to rely on various fixed effect estimators. But, the question is what is your variable of interest?

Exporter-by-year and importer-by-year fixed effects 

For instance, if you are interested in evaluating the effect of trade costs on trade, you can introduce exporter-by-year and importer-by-year fixed effects to absorb GDP, GDP per capita, price indexes etc.

Exporter-by-importer fixed effects

If you are interested in evaluating the effect of one country-specific variable on trade, you can introduce exporter-by-importer fixed effects to absorb distance or contiguity effects.

Exporter-by-year, importer-by-year + exporter-by-importer fixed effects

If you are interested in evaluating the effect of a time-varying bilateral factor, like free trade agreements, on trade (see Baier and Bergstrand, 2007), you can introduce exporter-by-year, importer-by-year + exporter-by-importer fixed effects to absorb distance or contiguity effects as well as GDP, GDP per capita, ....

References


Baier, S. L., &amp; Bergstrand, J. H. (2007). Do free trade agreements actually increase members' international trade?. Journal of international Economics, 71(1), 72-95.
Baldwin, R., &amp; Taglioni, D. (2006). Gravity for dummies and dummies for gravity equations (No. w12516). National Bureau of Economic Research.
Head, K., &amp; Mayer, T. (2013). Gravity equations: Workhorse, toolkit, and cookbook. This last reference is a must to read to construct a gravity model.