My answer would be that "Hedda Gabler" is an example of Realistic literature.
Given that Naturalism does stem from Realism, many texts can be justified under either period. But, here, very simple characteristics of the play determine it as a Realistic piece. (Though some may argue my point-of-view.)
In my interpretation, "Hedda Gabler" is a Realistic piece based upon simple reasonings.
First, the setting of the play is in that of an aristocratic home. In Naturalistic literature, settings are typically that of the poor. This contradiction to Naturalistic the typical Naturalistic setting is one reason I deem it a piece of Realism.
Second, the characters are far from ordinary. They newly wed couple has just returned from a six month long honeymoon. Naturalistic characters are typically poor and can only dream of a life like the one describe by Ibsen.
Lastly, characters in the play are able to better their own lives. In Naturalistic literature, no matter what a character does to better their life, they always succumb to forces beyond their control- typically forces of nature which are stronger than the power of man.
Yes, environmental conditions shape characters in Naturalism, but only to the degree in which it (nature) removes free will. Here, in the play, free will is exerted (refer to Lovborg and his ability to overcome).