I'm 5'7" and currently weigh 113 lbs. I recently started going g to the gym. What can I do to gain weight?

Gaining weight. There are really only 2 safe and effective things you can do to gain weight. 1st is exercise in which you replace fat tissue with muscle tissue, which has higher density and weighs more. The 2nd is to increase your calories in a sensible, balanced way: 5 servings of fruits and vegetables daily, 4 oz portions of meat, lots of fiber and grain. If you don't eat enough, supplements like ensure help.
Weight training. The best way to add lean body mass is with resistance training, ie weightlifting. Do not simply add calories to your diet. Adding calories beyond what your body burns adds fat, and only fat. Building lean body mass takes time, consistency, and hard work.