The BSE Sensex closed 46.64 points higher at 35,739.16, while the broader NSE Nifty rose 13.85 points to 10,856.70.
Sentiment was largely positive after April IIP grew at 4.9 per cent, spurred by higher growth in manufacturing and mining sectors.
However, concern prevailed over retail inflation inching up to 4.87 per cent in May on increase in food prices.
The BSE IT index was the session's top gainer, spearheaded by TCS which spurted 2.43 per cent after the company said it will consider a share buyback proposal at its board meeting on Friday.
Asian markets ended mixed and European stocks rose in early deals as investors awaited the US Federal Reserve's policy decision, shifting focus away from the US-North Korea summit.
The 30-share Sensex opened strong and hit a high of 35,877.41 on sustained buying by domestic institutional investors.
However, it succumbed to late selling and finally settled at 35,739.16, still up 46.64 points, or 0.13 per cent.
The index has now gained 295.49 points in three days.
Similarly, the broader 50-issue NSE Nifty ended higher by 13.85 points, or 0.13 per cent, at 10,856.70 after moving in the range of 10,893.25 and 10,842.65.
Meanwhile, domestic institutional investors (DIIs) bought shares worth a net Rs 1,327.45 crore, while foreign portfolio investors (FPIs) sold equities worth Rs 1,168.88 crore yesterday, provisional data showed.
"Market extended its rally as domestic industrial activity witnessed a turnaround at 4.9 per cent in April. However, caution ahead of Fed policy influenced late selling in the market which finally ended up with a marginal gain.
"The rise in CPI inflation to 4.87 per cent in May is largely factored in by the market and is in line with RBI's estimate for H1FY19 while 10-year yield was seen inching lower," said Vinod Nair, Head of Research, Geojit Financial Services.
Dr Reddy's emerged as the top gainer among the Sensex constituents, climbing 2.82 per cent, followed by TCS.
Sun Pharma gained 0.95 per cent after the company said it has received establishment inspection report (EIR) from the US health regulator for its Halol facility in Gujarat.
Other prominent winners were SBI 1.70 per cent, Power Grid 1.43 per cent, Infosys 1.41 per cent, ICICI Bank 1.18 per cent, Wipro 0.98 per cent, RIL 0.67 per cent, Bajaj Auto 0.66 per cent, Axis Bank 0.55 per cent, Hero MotoCorp 0.28 per cent, Yes Bank 0.21 per cent and Coal India 0.14 per cent.
Loser included Tata Steel 2.12 per cent, Adani Ports 1.48 per cent, HUL 1.31 per cent, Bharti Airtel 1.30 per cent, ONGC 0.79 per cent, IndusInd Bank 0.71 per cent, ITC 0.70 per cent, HDFC Ltd 0.65 per cent, L&T 0.48 per cent and HDFC Bank 0.46 per cent.
In sectoral terms, the BSE IT index rose 1.29 per cent, teck 0.94 per cent, healthcare 0.58 per cent, consumer durables 0.57 per cent, bankex 0.27 per cent, PSU 0.25 per cent and realty 0.22 per cent.
However, infrastructure index fell 0.71 per cent, while capital goods shed 0.66 per cent.
Broader markets dipped as investors booked profits in recent gainers, with the mid-cap and small-cap indices falling 0.46 per cent and 0.21 per cent.
US stocks closed little changed yesterday ahead of the Federal Reserve's policy decision.
In the Asian region, Japan's Nikkei gained 0.38 per cent, while Hong Kong's Hang Seng fell 1.22 per cent. Shanghai Composite Index too shed 0.97 per cent.
European shares, however, were in better form in their early deals. Frankfurt's DAX was up 0.11 per cent, while Paris CAC 40 rose 0.26 per cent. London's FTSE edged higher by 0.11 per cent.