The accident happened Saturday while the AL East-leading Red Sox warmed up at Yankee Stadium.
The Yankees said the 6-foot-6 rookie was examined by the team's medical staff. The club said Montgomery was expected to make his start Sunday night against Boston ace Chris Sale.
Montgomery was in foul territory, far down the right field line and behind a protective screen, when the ball flew over and struck him. He got help leaving the field. It was not known which Red Sox player hit the ball.
Montgomery is 7-6 with a 4.05 ERA in 21 starts for New York since making his major league debut this season.
The lefty recently lost his rotation spot and was sent to the minors when the Yankees traded for starters Sonny Gray and Jaime Garcia. He was recalled from Triple-A when CC Sabathia was put on the disabled list Friday.