This paper proposes a real-time price (RTP)-based demand-response (DR) algorithm for achieving optimal load control of devices in a facility by forming a virtual electricity-trading process, where the energy management center of the facility is the virtual retailer (leader) offering virtual retail prices, from which devices (followers) are supposed to purchase energy. A one-leader, N -follower Stackelberg game is formulated to capture the interactions between them, and optimization problems are formed for each player to help in selecting the optimal strategy. The existence of a unique Stackelberg equilibrium that provides optimal energy demands for each device was demonstrated. The simulation analysis showed that the Stackelberg game-based DR algorithm is effective for achieving the optimal load control of devices in response to RTP changes with a trivial computation burden.