Terms weren't disclosed by the Pirates, but the contract has a base value of $35 million and also includes two club options, according to reports.
Fox Sports reported Sunday that the total value of the deal, which begins in 2017, will be more than $60 million if the Pirates exercise both options.
"We are very pleased to have found a common financial ground with Gregory and his representatives," general manager Neal Huntington said in a statement. "This agreement will provide Gregory with incredible financial security and the club with the ability to build around Gregory as one of our core players for years into the future."
The deal is the latest in a series of similar extensions handed out by the Pirates, who have been aggressive in signing their young core players through their arbitration years.
Pittsburgh signed star center fielder Andrew McCutchen to a six-year, $51.5 million deal before the 2013 season and locked up left fielder Starling Marte to a six-year, $31 million extension before the 2014 season.
Polanco, 24, batted .256 with nine home runs and 27 stolen bases last season, his first full year in the majors. But the former top prospect showed vast improvement after the All-Star break, when he batted .276 with a .749 OPS.
Polanco went 2-for-3 with a double and two runs scored in Sunday's season-opening victory over the St. Louis Cardinals.