Effective field theory analysis of double Higgs boson production via gluon fusion