"We've decided the best decision is to get it done now so I am ready for pre-season training," the 32 year old midfielder said.
The England skipper will miss the Reds' final two Premier League games and also sit out England's friendlies against the Republic of Ireland on 29 May and Brazil on 2 June.
Gerrard will now lose his ever-present record.
"It's disappointing," he said, "But to be honest it's not a very important personal achievement. What is more important is that I am fit and available for the team.
"I first got the injury against Oldham in the FA Cup when I came on as a sub and I've since aggravated it on numerous occasions.
"It's probably better if another player plays because he'll be able to offer more because the shoulder is quite sore."