At present, power systems based on gas turbines are mainly used for electricity and heat generation. Gas turbines are used in industrial and institutional applications due to high-temperature exhaust, which can be used for heating, drying, or process steam production. The combined cycle gas turbine plants are a mature technology with high reliability and offering rapid response to changing demand for electricity and heat. The combination of a gas turbine with a heat recovery system and a heat accumulator makes the combined heat and power (CHP) plant a flexible unit. The paper presents the optimization tool for the planning process of electricity and heat production in the gas-fired CHP plant with a heat accumulator. The detailed mathematical model of the analyzed cogeneration plant was developed with the EBSILON®Professional and verified based on the results from on-site tests and warranty measurements. The implemented optimization algorithm is used to maximize the profits of the CHP plant operation. The presented solution is based on an evolutionary algorithm. The optimization algorithm is applied to the production determination for the day-ahead planning horizon, with 1-h time step. The obtained results show that the developed optimization model is a reliable and efficient tool for production planning in a CHP plant with gas turbines. The comparative exergy analysis for different technologies of heat recovery from gas turbine exhaust gases was performed to evaluate the quality of the energy conversion process in the CHP plant.