The 32-year-old had originally been due to undergo surgery in the summer. However, following consultation with the medical team, it has been decided that the treatment is required now.
"The captain's injury has progressively worsened in recent weeks and requires an operation to cure it," read a short statement on the club's official website.
Gerrard will now miss the final two matches of the Premier League season against Fulham and Queens Park Rangers, while he is also likely to sit out England's friendlies against the Republic of Ireland and Brazil next month.
He will be fit to return for pre-season training in July, though.