Nifty 50 and Sensex gained on Monday due to positive Asian market trends and hopes for a U.S. government shutdown resolution.