Most simply, the goal line is the line defining the area of the goal. When the proper person or object crosses the goal line a goal is scored. The goal line is most commonly referred to in American football. The goal lines in football (futbol, soccer) and hockey are similar in placement and in function to the goal line in American football. More broadly defined, there is a goal line in many other sports. Even more broadly defined than that, the goal line is a component of a popular conceptual metaphor - the fulfilled prerequisite that turns a goal into an achievement.
Strictly speaking, the goal line in American football is defined as a plane extending vertically up from the field at the 0 yard line and running to each sideline. The plane is marked first by a paint or chalk line across the field, at the 0 yard line, separating the field of play from the end zone. It is also marked at each sideline by a small, orange pylon.
In order for a goal to be scored a player must move the ball across the goal line. There are numerous rules that determine whether or not a player has done this correctly (no penalties assessed against the player's team, the player can not push the ball across after being declared 'down,' a player must be in posession of the ball).
The plane formed by the uprights and crossbar of the goal posts may be considered an additional goal line. A ball passing through the uprights is considered a goal. This may only be a goal line in the literal sense, it is never referred to as one.
Similar to American football, sports such as hockey, water polo and football (futbol, soccer) have a field of play with a goal at either end. Unlike American football, these goals do not extend all the way to the sideline or indefinitely upwards. Rather, they are defined by a goalie's box or scoring box centered between the sidelines. The goal line is, then, the plane that is defined by the box. When the ball or puck breaks this plane a goal is scored.
This definition scales downwards to include tabletop games of similar structure - air hockey and foosball being two good examples.
Basketball does not technically have a goal line as the goal line is usually, partly defined by the ground. However, similar to those mentioned above - the goal line may be the plane defined by the area of the hoop. When the ball passes through this plane a goal is scored.
Defining goal lines for each sport individually would be both tedious and, ultimately pointless. Outside of the sports with specifically defined goals, in which they are actually called goals, the goal line is merely a metaphor. In billiards, for instance, the goal line might be defined as the line around the pocket beyond which the ball will fall in. In darts there are a myriad of goal lines on the board with specific or actual goal lines depending upon the current target. Tennis and ping-pong are not worth thinking about.
This leads to the last, most nebulous usage of goal line. When a person or group sets a goal it may be considered to have a goal line if there is a clearly definable point at which the goal becomes an achievement. A person who goes on a diet may call their target weight a goal line. A nation working to curb illiteracy may define the goal line as a certain percentage of the population being able to read. A noder writing a long, sarcastic 'factual' to 'properly' 'fill' a 'pointless' nodeshell my consider the goal achieved upon clicking the 'submit' button.