Answer by taking a quote from the following article:

Montana was born to Joseph Clifford Montana Sr. (1932-2017) and Theresa Marie Bavuso Montana (1935-2004) in New Eagle, Pennsylvania, a borough of Washington County located in the western portion of the state. He grew up in the city of Monongahela, a coal mining town 25 miles (40 km) south of Pittsburgh. His maternal grandparents, Vincenzo "James" Bavuso and Josephine Savarino Bavuso, were both Italian immigrants.

Aided in part by Montana's performance at quarterback, the 49ers advanced to the NFL Playoffs again in 1985; however, they lost in the NFC Wild card game to the New York Giants.  In 1986, Montana suffered a severe back injury during week one of the season. The injury was to a spinal disc in Montana's lower back and required immediate surgery. The injury was so severe that Montana's doctors suggested that Montana retire. On September 15, 1986, the 49ers placed Montana on the injured reserve list; however, he returned to the team on November 6 of that year. In his first game back from injury Montana passed for 270 yards and three touchdown passes in a 43-17 49er victory against the St. Louis Cardinals. Montana appeared in just eight games that season, and threw more interceptions than touchdown passes for the only time in his career. The 49ers finished the season with a record of 10-5-1. Montana was co-recipient (with Minnesota Vikings quarterback Tommy Kramer) of the 1986 NFL Comeback Player of the Year Award.  In 1987, Montana had 31 touchdown passes, a career-high, in just 13 games. Montana crossed the picket line during the NFLPA strike and threw five touchdowns against replacement players. In 1987, he also set the NFL record for most consecutive pass attempts without an incomplete pass (22), passed for 3,054 yards, and had a passer rating of 102.1. Though the 49ers finished with the best record in the NFL, they lost in the Divisional Round of the playoffs to the Minnesota Vikings.  Prior to the 1987 season, Bill Walsh completed a trade for Steve Young, then a quarterback with the Tampa Bay Buccaneers. Young went on to appear in eight regular season games for the team and finished the year with a passer rating of 120.8.

How did they do in the playoffs?
however, they lost in the NFC Wild card game to the New York Giants.