What are differences between the terms "time series analysis" and "longitudinal data analysis" When talking about longitudinal data, we may refer to data collected over time from the same subject / study unit repeatedly, thus there are correlations for the observations within the same subject, i.e., within-subject similarity.
When talking about time-series data, we also refer to the data collected over a series of time and it seems very similar to the longitudinal setting mentioned above.
I'm wondering if someone can provide a clear clarification between these two terms, what is the relationship and what are the differences?
 A: These two terms might not be related in the way the OP assumes--i.e., I don't think they are competing modes of analyses. 
Instead time-series analysis describes a set of lower-level techniques which might be useful to analyze data in a longitudinal study. 
The object of study in time series analysis is some time-dependent signal.
Most techniques to analyze and model / predict these time-dependent signals are built upon the premise that these signals are decomposable into various components. The two most important are:


*

*cyclic components (eg, daily, weekly, monthly, seasonal); and

*trend
In other words, time series analysis is based on exploiting the cyclic nature of a time-dependent signal to extract an underlying signal. 
A: I doubt there are strict, formal definitions that a wide range of data analysts agree on.  
In general however, time series connotes a single study unit observed at regular intervals over a very long period of time.  A prototypical example would be the annual GDP growth of a country over decades or even more than a hundred years.  For an analyst working for a private company, it might be monthly sales revenues over the life of the company.  Because there are so many observations, the data are analyzed in great detail, looking for things like seasonality over different periods (e.g., monthly: more sales at the beginning of a month just after people have been paid; yearly: more sales in November and December, when people are shopping for the Christmas season), and possibly regime shifts.  Forecasting is often very important, as @StephanKolassa notes.  
Longitudinal typically refers to fewer measurements over a larger number of study units.  A prototypical example might be a drug trial, where there are hundreds of patients measured at baseline (before treatment), and monthly for the next 3 months.  With just 4 observations of each unit in this example, it is not possible to try to detect the kinds of features time series analysts are interested in.  On the other hand, with patients presumably randomized into treatment and control arms, causality can be inferred once the non-independence has been addressed.  As that suggests, often the non-independence is considered almost a nuisance, rather than the primary feature of interest.  
A: There are roughly three kinds of datasets:


*

*cross section: different subjects at the same time; think of it as one row with many columns corresponding to different subjects;

*time series: the same subject at different times; think of it as one column with rows corresponding to different time points;

*panel (longitudinal): many subjects at different times, you have the same subject at different times, and you have many subjects at the same time; think of it as a table where rows are time points, and columns are subjects.

A: What Are Longitudinal Data?
Longitudinal data, sometimes referred to as panel data, track the same sample at different points in time. The sample can consist of individuals, households, establishments, and so on. In contrast, repeated cross-sectional data, which also provides long-term data, gives the same survey to different samples over time.
Longitudinal data have a number of advantages over repeated cross-sectional data. Longitudinal data allow for the measurement of within-sample change over time, enable the measurement of the duration of events, and record the timing of various events. For example, suppose the unemployment rate remained high for a long period of time. One can use longitudinal data to see if the same group of individuals stays unemployed over the entire period or if different groups of individuals move in and out of unemployment over the time period.
Source
A: To make it simple I will assume a study of individuals, but the same applies to any unit of analysis. It isn't complicated, time series is data collected over time, usually implying the same measurement from an equivalent population at separate time intervals - or collected continuously but analyzed at timed intervals.
Longitudinal data much broader in scope.  The equivalent population is replaced by the identical population, so individual data can be paired or joined over time.  Longitudinal data can be repeated measurements or not depending on the goal of the study.  When Longitudinal data looks like a time series is when we measure the same thing over time.  The big difference is that in a time series we can measure the overall change in the measurement over time (or by group) while in a longitudinal analysis you actually have the measurement of change at the individual level.  So you have much more potential for analysis and the measurement of change is without error if sampling is involved, so a longitudinal study can be more precise and informative.
