The 26-year-old right-back suffered an injury in the New Year’s Day 0-0 draw with Nottingham Forest and has now gone under the knife, the club have confirmed.
Ayling, who signed a new contract until 2021 in October, has made 30 appearances for United this season with the club sixth in the Sky Bet Championship.
It is another blow for Leeds after forward Samuel Saiz was banned for six games for spitting during the FA Cup third-round defeat at Newport.
Boss Thomas Christiansen was already short of full-back options, although the club are reportedly close to a deal for Club Brugge left-back Laurens De Bock and could recall Lewie Coyle from his loan spell at Fleetwood.
Colchester will hand late fitness tests to Ryan Jackson and Brandon Comley prior to their clash with Yeovil.
Arsenal secured their place in the quarter-finals of the Europa League following their 3-1 defeat of AC Milan at the Emirates Stadium on Thursday.
Danny Welbeck scored twice against AC Milan to toast his England recall by sending Arsenal into the last eight of the Europa League.
Ipswich striker Joe Garner will not play again this season after it emerged he suffered a fractured skull against Sheffield United last week.