Smart grid technology enables active participation of the consumers to reschedule their energy consumption through demand response (DR). The price-based program in demand response indirectly induces consumers to dynamically vary their energy use patterns following different electricity prices. In this paper, a real-time price (RTP)-based demand response scheme is proposed for thermostatically controllable loads (TCLs) that contribute to a large portion of residential loads, such as air conditioners, refrigerators and heaters. Wind turbine generator (WTG) systems, solar thermal power systems (STPSs), diesel engine generators (DEGs), fuel cells (FCs) and aqua electrolyzers (AEs) are employed in a hybrid microgrid system to investigate the contribution of price-based demand response (PBDR) in frequency control. Simulation results show that the load frequency control scheme with dynamic PBDR improves the system’s stability and encourages economic operation of the system at both the consumer and generation level. Performance comparison of the genetic algorithm (GA) and salp swarm algorithm (SSA)-based controllers (proportional-integral (PI) or proportional integral derivative (PID)) is performed, and the hybrid energy system model with demand response shows the supremacy of SSA in terms of minimization of peak load and enhanced frequency stabilization of the system.