Basically if you couldn't pass this course - and in some cases department policy limited you to a single try - your chances of success in that major were slim to nonexistent, and you were encouraged by your advisor to find a different major. If you could pass the weed-out course, you could be reasonably assured you were ready to face the rest of your coursework, because nothing ahead would be as difficult as that course was. And, that you were reasonably certain this was what you wanted to do.
They weren't necessarily directly related to the major. For some of the engineering and science programs, a math course was often the weed-out course.
I can't say for sure that this was the author's experience, but her description of it sounds very much like a weed-out course.