Mr Gray has been with Ofgem for close to five years and will have "overseen the price controls for all the monopoly distribution and transmission companies, in both gas and electricity, by the time he finishes in December", Ofgem states.
Commenting on his departure, the regulator's chief executive Alistair Buchanen said: "David Gray's stewardship of the Networks Division, and in particular the delivery of the price controls, has been at an extraordinarily high level of professionalism and delivery. He has ensured that Ofgem's price controls have delivered over £15 billion of investment into Britain's energy networks while keeping costs to consumers as low as possible."
"Steve Smith's move to networks comes at an exciting time for the division with an increasing focus on the development of a new regime for offshore wind, reform of access to electricity transmission networks and distributed generation - as well as the price controls," he added.
Click here to run an energy price comparison, and see if you could be paying less for your gas and electricity.