The hierarchical and the centrally-controlled grid topology of existing electrical power systems has remained unchanged over the 20th century. On the other hand, there is a rapid increase in the cost of fossil fuels coupled with the inability of utility companies to expand their generation capacity in line with the rising electricity demand, without modernizing the grid. For these reasons, it is needed to modernize the existing power grids and consequently smart power grids have emerged. Unlike the benefits and features ensured by smart grids, this paper provides a detailed survey of the critical challenges in smart grids in terms of information and communication technologies, sensing, measurement, control and automation technologies, power electronics and energy storage technologies. It is expected that this paper will lead to the better understanding of potential constraints in smart grid technologies.