No. That isn't it. The window size can't be 2ms. You must use PWM function of ESP8266.
Your description seems to be disagree with your pic. I don't really get it.
Assuming the period is 2m, and 100% cycle means full open while 0% means close.(Will the fire be lit when it opens again?)
Then you will need to initialize the PWM PIN,( you can use D7).
analogWriteRange(500); // 2 microseconds, 500hz
Then, you call the following function to set duty cycle.
analogWrite(D7, (pidOutput/255) *1023);
This is the rough idea.
Man you make it look easy.. It would be interesting that the output could drive a servo, that way you could mechanically actuate something proportionally.
And yes for gas, you would always have a pilot flame on.