Equity benchmark indices gained for the second consecutive day on Wednesday as heavy buying was witnessed in pharma and financial stocks.