Power producers in a deregulated electricity market require a suitable strategy for bidding in order to maximize their benefit. Therefore, individual power supplier bids strategically for selecting coefficients of bid to oppose the strategy of rivals bidding. The oppositional learning based gravitational search algorithm (OGSA) is used in this paper to solve an optimal strategy of bidding problem. Gravitational search algorithm (GSA) is encouraged from mass interactions and law of gravity. In OGSA, opposite agents provide better optimal solutions compared to that of random agent solutions. The utilization of opposite agents in the evaluation process of GSA enables enhanced exploration of the search space. This prevents trapping of the search in local optimal solution and improves rate of convergence in GSA. The proposed method is tested on IEEE 30-bus system. The obtained results suggest that OGSA gives better solution in terms of profit as compared to other approaches such as Monte Carlo, Genetic Algorithm, Particle Swarm Optimization and Gravitational Search Algorithm.