Can a wifi thermostat to control milivolt operated fireplace?
No problem. 

First, the furnace must be designed to have an external millivolt thermostat.   A millivolt thermostat is a very simple creature, it has 2 wires going to it, and it shunts those to call for heat. 

Second, the smart 'stat will need a 24V power supply.  This is available from any $15 thermostat transformer, such as many designed to mount in junction box knockouts or on the cover of a junction box.  The 24V wires go to R and C on the smart 'stat.  It goes without saying, this smart stat will not work with the power out. 

The smart 'stat cannot directly talk to the millivolt furnace.  However since a millivolt 'stat simply shunts the two wires, a relay can be used to shunt those same two wires.  The NO contacts of the relay go to those two wires.   The coil winding of the relay goes to W and C on the smart 'stat. 

And that's it.  

Now one more thing.  A wonderful feature of most millivolt furnaces is that they are able to run normally when the AC power is knocked out.  It's the difference between shelter in place, or needing a hotel room.  ** Now, the smart stat will lose its 24VAC when the AC power fails, so it will not be able to command the relay to turn on.   For that reason, leave an analog millivolt stat in parallel with the relay.  Set it to 40F so it stays out of the way, then when you need it, you can set it to your desired temp and it will shunt the wires and make the furnace kick. 

** Difference between your pipes freezing or not.   (As if anyone would install a millivolt furnace in the snowbelt, ha ha, they are all used in Florida and California of course.  You can't even buy them in the snowbelt, nobody carries them and your HVAC guy doesn't know what they are).