If you attempt to perform an action not supported by the History palette, you will see the "Unable to complete History operation" dialog. You received this error message due to one of the following situations:
Most likely, you attempted action that isn't allowed due to a dependency on another action. For example, if you were to create a new layer on an image consisting of only one layer, delete the layer via the Layers > Delete command, and then in the History palette attempt to selectively undo the creation of the new layer, this error dialog will appear. This is because the selective undo of the layer creation would force the deletion of the image's only remaining layer, which is not allowed.
In some cases, a command may not support selective operations. You will not be able to selectively redo this command or undo commands preceding it.
Please review what action you took to bring up the error dialog.