Mary Sue traits:
1.Usually young.
2.Extremely competent, to the point they can do everyone else's job better than they can.
3.Little to no personality of their own.
4.Unusual/special talents.
5.Unusual/special physical appearance.
6.Their opinions are seen as gospel.
7. People take an instant liking to them.
8. Incorruptible.
9. Major flaw is usually stubbornness.
10. Constantly whines about their non existent problems.
11. Gets special treatment from the other characters.
12. Often the heir to a great legacy.
So, let's examine Leliana with these:
1. Nope. She's already close to her 30s when we meet her in Origins.
2. Nope. That's why she calls upon Josephine to handle the diplomacy aspect in the first place.
3. Plenty of personality. She likes animals, fine clothing in general, shoes in particular. She feels strongly about mage issues and the Chantry. She has faith and she is devoted to the people who matter to her.
4. Nothing special. Nobody mentions any talent that is mind blowing.
5. She's pretty, but nobody goes crazy about it. Her features are normal.
6. Nope. Cullen, Josephine and Cassandra disagree with her plenty.
7. Nope. Morrigan and Loghain disliked her immensely on first acquaintance.
8. Oh my no. She lets a lot of people influence her for the worst, Marjolaine being the prime example here.
9. Nope. Her major flaw is her tendency to let people influence her to the point she loses sight of herself.
10. Nope. The one time she complains (the crisis of Faith moment) she apologizes right after it happens. Not a complainer.
11. Nope. She's expected to do her job and held accountable for it. Especially by Cassandra.
12. Nope. Her parents were nobodies. Dorothea reached out to her because of their shared misery at the hands of Marjolaine. Not because she's special.
There are more elements that do not fit with a Sue: Alistair outright called her crazy on first acquaintance, Morrigan and Zevran mocked her for her beliefs, Oghren didn't seem to have any interest in her beyond ogling and Loghain dismissed her as just another Orlesian.
She is prone to letting her emotions guide her judgement. The decision to kill the agent at the beginning came from wanting to protect the others but also possibly from a desire for revenge. Same thing with her doubt about pulling the scouts back later. She constantly questions herself and usually goes into 'I should have done things differently'. A Sue would go for 'I did my best. It wasn't my fault. There was nothing else I could do'. Also the critical character would get yelled at by everyone else.
As for the 'writer's pet' status. It's possible, but her presence does add something to the story of Inquisition in her contrast with Cassandra. Leliana was friends with the Divine while Cassandra had a professional relationship with her. The situation is inverted with the Inquisitor. We can never get as close to Leliana as we can with Cassandra. The writers could simply have decided that her story wasn't quite over yet and decided to close it with this game.
There are two elements that could be seen as Sue traits:
The 'soft Divine' ending and her resistance to the Blight. The latter is unfortunately never explained, but perhaps we'll find more people in future games who share this trait.