The former Schalke man underwent surgery on Thursday (AEST) to treat a bad bruise after initially sustaining damage last month.
Goretzka aggravated the issue on Germany duty and was forced to skip his country's Euro 2020 qualifiers against Netherlands and Northern Ireland.
"Bayern are set to be without midfielder Leon Goretzka for a period of time," read a club statement.
"The 24-year-old suffered another injury on his left thigh during Germany's preparations for their match against Netherlands last week.
"He was subsequently forced to undergo an operation on Wednesday to remove a haematoma. The surgery was successful."
Goretzka missed Bayern's opening two Bundesliga games of 2019-2020 but returned to the bench for the 6-1 victory over Mainz at the end of August.
He made 30 league appearances for Niko Kovac's side last season, scoring eight goals.