Yes it has a direct relation, see the followings:
source: البرهان في تفسير القرآن، ج3، ص: 802,803
علي بن إبراهيم، قال: آل محمد (عليهم السلام) هم أهل الذكر.
Ahlul Bayt --peace be upon them-- are those who posses the massage.
محمد بن العباس، قال: حدثنا أحمد بن محمد بن سعيد، عن أحمد بن الحسن، عن
أبيه، عن الحصين بن مخارق، عن سعد بن طريف، عن الأصبغ بن نباتة، عن أمير
المؤمنين (عليه السلام)، في قوله عز و جل: فَسْئَلُوا أَهْلَ الذِّكْرِ
إِنْ كُنْتُمْ لا تَعْلَمُونَ. قال: «نحن أهل الذكر».
The commander of the believers --peace be upon him-- said about the
saying of Allah that: "If ye realise this not, ask of those who
possess the Message" that "we are those who possess the Message"
ثم قال: حدثنا محمد بن جعفر، قال: حدثنا عبد الله بن محمد، عن أبي داود
سليمان بن سفيان، عن ثعلبة، عن زرارة، عن أبي جعفر (عليه السلام)، في
قوله: فَسْئَلُوا أَهْلَ الذِّكْرِ إِنْ كُنْتُمْ لا تَعْلَمُونَ من
المعنون بذلك؟ فقال: «نحن و الله». فقلت: فأنتم المسؤولون؟ قال: «نعم».
قلت: و نحن السائلون؟ قال: «نعم». قلت: فعلينا أن نسألكم؟ قال: «نعم»
قلت: و عليكم أن تجيبونا؟ قال: «لا، ذاك إلينا، إن شئنا فعلنا، و إن شئنا
تركنا- ثم قال- هذا عَطاؤُنا فَامْنُنْ أَوْ أَمْسِكْ بِغَيْرِ حِسابٍ».
Imam Baqir --peace be upon him-- was asked about "If ye realise this
not, ask of those who possess the Message" who are those addressed
by that? Imam said: "We, by Allah". Te masn then asked: "so you are
those questioned?" Imam said: "yes". He asked: "and we are those who
question?", Imam said: "yes". He asked again: "so is it obligatory for
us to ask from you?" Imam said: "yes". He asked again: "and is it
obligatory for you to answer?" Imam said: "no, that has been left up
to us, if we want we do and if we don't want we don't" [because not
everyone can be told of every facts, it depends on the capacity of the
questioner and the listeners, also it addresses the occultation of
Imam Mahdi --peace be upon him-- for example] then Imam recited
"Such are Our Bounties: whether thou bestow them (on others) or
withhold them, no account will be asked" [38,39]
و عنه: عن سليمان الزراري، عن محمد بن خالد الطيالسي، عن العلاء بن رزين
القلاء، عن محمد بن مسلم، عن أبي جعفر (عليه السلام)، قال: قلت له: إن من
عندنا يزعمون أن قول الله عز و جل: فَسْئَلُوا أَهْلَ الذِّكْرِ إِنْ
كُنْتُمْ لا تَعْلَمُونَ، أنهم اليهود و النصارى؟ قال: «إذن يدعونكم إلى
دينهم». ثم قال: ثم أومأ بيده إلى صدره، و قال: «نحن أهل الذكر، و نحن
المسؤولون».
Imam Baqir --peace be upon him-- was asked about the fact that there
were some people thinking by "If ye realise this not, ask of those
who possess the Message" it is meant the Jews and the Christians?
Imam said --peace be upon him-- said: "if it was so they were inviting
you to their own religions", then he nodded with his hand to his chest
and said: "we are those who possess the Message and we are those who
are [or must be] questioned"
According to these Ahadeeth, following Ahlul-Bayt --peace be upon them-- (Imams of Shi'ite) is obligatory to all the Muslims, and this is in good coincidence with the famous Hadeeth of the arc, see this answer:
مَثَلُ أهلِ بَیتی کَمَثَلِ سَفینَهِ نوحٍ مَن رَکِبَها فَقَد نَجی وَ
مَن تَخَلَّفَ عَنها فَقَد هَلَکَی
My household is alike the arc of Noah, whoever that got in it has been
survived, and whoever that avoided it has been demolished.
This Hadeeth says not only whoever thet gets in to this arc will survive, but also whoever that avoid the arc will be demolished, and Allah is the Just, no one will be demolished unless he has been warned previously. Another witness for that is the famous Hadeeth of the two weighty things, Qur’an and the household of the holy Prophet --peace be upon him and his household-- will never separate from each other, whoever that deny one of them has no way to deny also the other, and whoever that accept one of them has no way to accept also the other.
Therefore, Taqleed (following someone and learn the rules from him) is meant by this verse, as far as I can say.