The example is correct, and also the explanation is correct. When ばかり connects to a past form, it means the subject just did the verb. On the other hand, when it connects to a ーて form or a simple form, it means the subject do nothing but the verb, which have a somewhat negative connotation. There are always exceptions, but most of cases can be applied to this.
Then get back to the baby sentence. The meaning of it is that the baby was nothing but crying. If one wants to say the baby had just cried -- she was in the state right after crying --, then it will be… 赤ちゃんは泣いたばかりでした。Honestly, it seems a little unnatural, because we often use 直後 or other expressions instead in written Japanese. However, in colloquial Japanese, the use is fine. Anyway, I think you maybe misunderstood the conjugation of 泣く. 泣く is the simple form so that 泣くばかりでした is the almost same as 泣いてばかりでした.
私はごはんを食べたばかりです:I've just finished eating.
私はごはんを食べてばかりです:I do nothing but eating.
私はごはんを食べたばかりでした。: I had just finished eating.*
私はごはんを食べてばかりでした:I used to do nothing but eating.
*As I mentioned, it is unnatural in written Japanese.