The original business motion, which set out the schedule and rules for the Meaningful Vote on the Brexit deal (item 5 in the Votes and Proceedings from 4 Dec 2018) states that:
(9) No motion to vary or supplement the provisions of this Order shall be made except by a Minister of the Crown; and the question on any such motion shall be put forthwith.
This was interpreted to mean that only the government could vary the details of this business motion, and this is standard practice for such motions.
On 9 Jan 2019, the government put before the House a second business motion which varied the first one, assuming that this could not be amended. To their surprise, Dominic Grieve MP was permitted to submit an amendment to this.
The Speaker of the House of Commons has the final say on whether amendments (whether to motions, or bills) are acceptable, and so was challenged on his decision in this matter. He said (emphasis mine):
the motion in the Prime Minister’s name is indeed a variation of the order agreed by the House on 4 December. Under paragraph (9) of that order, the question on any motion to vary the order “shall be put forthwith.” I interpret that to mean that there can be no debate, but I must advise the House that the terms of the order do not say that no amendment can be selected or moved. I cannot allow debate, but I have selected the amendment in the name of the right hon. and learned Member for Beaconsfield.
In response to another question, he said:
The right hon. Gentleman referred to a motion and said that no motion in this context, for the purposes of precis, may be moved other than by a Minister of the Crown. ‘Tis so. We are not treating here of a motion but of an amendment to a motion.
To summarise: the controversy is that the original business motion stated that it couldn't be varied by anyone other than the government, via a second business motion. However, in the Speaker's opinion, an amendment to that second business motion was not explicitly ruled out, so that is acceptable.
Later in that exchange, it was also suggested that there is a precedent that business motions cannot be amended. However, that appears less clear, not least because the motion from 4 Dec 2018 was itself amended at the time.
EDIT: This article from UCL's Constitution Unit provides further background on this issue, and Commons procedure in general.